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
byrdsbyrds 

Custom button executing Javascript - Not load email template

Hello - I need a button on an Opportunity that will load data from the Opportunity to an email template and send email.

 

This is working - loads a template - (this template has no merge fields to load):

location.replace('/email/author/emailauthor.jsp?retURL=

     {!Contact.Id}&rtype=003&p2_lkid=

          {!Contact.Id}&template_id=00XE0000000lOIF')

 

Opens email - loads the email template - loads the to email address - The email body is on the template and loads fine.

 

I need to do the same as above but on the template - I needs to pull data from the Opportunity fields.  

I have everything mapped on the template to pull data from fields but nothing shows for the look up values.

If I load the template by searching the list rather than from just clicking the button, the template loads fine.

 

location.replace('/email/author/emailauthor.jsp?retURL=

     {!Opportunity.Carrier_ContactLUId__c}&rtype=003&p2_lkid=

          {!Opportunity.Carrier_ContactLUId__c}&template_id=00XE0000000yW6M')

 

Any ideas or help?

 

Thanks