function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ForceComForceCom 

Mail merge---Help Needed !!!

Hi

 

I am trying to create an mail merge button on an custom object...I created the button it works well...but I cannot pre populate the contact record .....i.e the option which says  Specify the contact to merge with the Word document:....

 

/mail/mmchoose.jsp?id={!Custom_Object__c.Id}&2={!Contact.Contact_Record_ID__c}

 

 

I would really appreciate any help/advises....

 

Thanks All

 

 


 



Best Answer chosen by Admin (Salesforce Developers) 
jhurstjhurst

You would have to use the form field name (which is not "2").  So since you are trying to pass a value to a lookup field, you actually have to pass the Contact ID and the Contact Name.  The link would look soimething like: 

 

/mail/mmchoose.jsp?id={!Custom_Object__c.Id}&p3_lkid={!Custom_Object__c.Contact__c}&p3={!Custom_Object__c.Contact__r.Name}

 

Where "Custom_Object__c.Contact__c" is the Contact field on your custom object and "Custom_Object__c.Contact__r" is the relationship name on the custom contact field.

 

If you do not havea contact field on your custom object, then you would not be able to add the contact in the link, since the system has no reference to which contact you would want to use.

 

Jay