• Marya
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 5
    Replies
Does anyone know how to customize the layout of the Quote PDF output?  I need to hide a column, as well as add some additional text before we can use it in production, but can't find where I can do this.
  • March 09, 2010
  • Like
  • 0

I'm new to developing for SFDC.  What I am trying to do is create an email report that we can send to our customers showing all of their purchases that have an upcoming contract end date (to encourage renewal). 

 

I have the basic visualforce template created, but what I don't know how to do is:

  • Filter results to only show opportunities that are "Closed Won"
  • Filter results to only show opportunities with Contract End Date (ContractEndDate__c) within the last 30 days AND next 60 days (ie last month and next two months)
  • Sort results by Contract End Date

 

Any help is greatly appreciated.  Thanks!

 

<messaging:emailTemplate subject="Your license summary" recipientType="Contact" relatedToType="Account"> <messaging:htmlEmailBody > <html> <body> <style type="text/css"> table {width: 500px;border: solid #CCC 1px;} th {font-family: Arial, Helvetica, sans-serif;font-size: 11px;background-color: #CCCCCC;text-align:left;} td {font-family: Arial, Helvetica, sans-serif;font-size: 11px; border:dotted #ccc thin;} tr {border: solid #CCC 1px;} td.end-user{text-align:center;border:none;} td.spacer{background-color:#ccc;; height:3px;} </style> <table cellspacing="0" cellpadding="0" align="center"> <tr> <th scope="col">Exp. Date</th> <th scope="col">AV#</th> <th scope="col">PW</th> <th scope="col"># of Licenses</th> <th scope="col">Product</th> </tr> <apex:repeat var="opp" value="{!relatedTo.Opportunities}"> <tr> <td> <apex:outputText value="{0,date, MMMM d', 'yyyy}"> <apex:param value="{!opp.ContractEndDate__c}"/> </apex:outputText> </td> <td>{!opp.License_AV__c}</td> <td>{!opp.License_Password__c}</td> <td><apex:outputField value="{!opp.NumberofLicenses__c}"/></td> <td>{!opp.Product__c}: {!opp.Product_Type__c}</td> </tr> <tr> <td colspan="5" class="end-user"><br /> {!opp.End_User_Company__c} | {!opp.End_User_First_Name__c} {!opp.End_User_Last_Name__c} | {!opp.End_User_Email__c} | {!opp.End_User_Phone__c}</td> </tr> <tr> <td colspan="5" class="end-user">{!opp.End_User_Address_1__c} {!opp.End_User_Address2__c}, {!opp.End_User_City__c}, {!opp.End_User_State__c}, {!opp.End_User_Zip_Code__c} <br /> </td> </tr> <tr> <td colspan="5" class="spacer"></td> </tr></apex:repeat> </table> </body> </html> </messaging:htmlEmailBody> </messaging:emailTemplate>

 

  • September 21, 2009
  • Like
  • 0
Does anyone know how to customize the layout of the Quote PDF output?  I need to hide a column, as well as add some additional text before we can use it in production, but can't find where I can do this.
  • March 09, 2010
  • Like
  • 0

So I called SF Basic support and they said I need a formula to do what I need done, that they can't do formula, and that I should ask here...  So here I am. 

 

I am trying to filter contact views based on a custom field value in the contact's associated account record.  But Account custom fields don;t come up in the logic filter fields under contact views. 

 

So if I could pull in the field value (pick list) from the contacts associated account custom field then it would appear in my view logic filter, and I would be happy. 

 

So I have a account custom field named Account Relationship with multiple pick list text values.  How do I:

 

  • Replicate the vales into a contact custom field
  • For all contacts associated with a given account

 

Thanks team. 

 

 

As discussed in Ideas (http://ideas.salesforce.com/article/show/69729) here's a solution we have used for clients to enable customisation of the Clone button on Opportunities. This can be used to selectively choose which fields to copy and set default values:

 

For full details and the code to clone opportunity Line Items please contact me directly. We will be re-writing this in VisualForce over the coming months to make it futureproof.

 

Steps to Implement - Admins only

1. Setup -> Customize -> Opportunity -> Buttons and Links

2. Create new custom button called Clone, behaviour is Execute Javascript, Display Type Detail Page Button.

3. Paste in the code below and edit to match your requirements.

4. Remember to add the new button to the Opportunity page layout(s) and hide the original Clone button.

4. Test!

 

// Copyright 2008 BrightGen Ltd - All Rights Reserved try{ {!REQUIRESCRIPT("/soap/ajax/14.0/connection.js")} // ** EDIT THIS QUERY TO LIST THE FIELDS YOU WANT TO COPY ** var result = sforce.connection.query("Select o.Type, o.StageName, o.Product_Type__c, o.Planned_Opportunity__c, o.MarketSector__c, o.CampaignId, o.Business_Unit__c, o.Amount, o.AccountId From Opportunity o WHERE o.Id = '{!Opportunity.Id}'"); var newOpp = result.getArray("records"); // Reset the Opp Id and reset fields to default values newOpp[0].Id = ''; newOpp[0].Name = "Clone {!Opportunity.Name}"; // ** EDIT THESE FIELDS TO SET DEFAULT ANY VALUES ** newOpp[0].StageName = "1. Prospecting"; newOpp[0].CloseDate = new Date(2099, 0, 1); var saveResult = sforce.connection.create(newOpp); if (saveResult[0].getBoolean("success")) { newOpp[0].id = saveResult[0].id; alert("Opportunity cloned without line items"); } else { alert("Failed to create clone: " + saveResult[0]); } // Refresh the page to display the new oppportunity window.location = newOpp[0].id; } catch (err) { alert (err.description ); }

 

 
Message Edited by bg_richard on 02-05-2009 07:11 AM