Case Study:
How to Create an email template that will Auto Fill the account, and primary contact when selected from the Send Email from the Opportunity Activity History panel.
Clicking on Send Email from there gives a blank window to send email from - How to fill them with information from the record which they are coming from
Solution :-
One click java-script to Send an email using standard emailing screen. See below :-
location.replace('/email/author/emailauthor.jsp?retURL=/{!Account.Id}&p24=<To Email Address>&template_id=<email template id>&p3_lkid={!Account.Id}&p3={!Account.Name}&p26=<from email address>&p5=&save=0');
Let us quickly analyze the URL Parameters :-
p2_lkid = it is "Email TO" Field Code , associated only with Contact ID of Contact Standard Object, populares the Contact in To Field of Email.
rtype = record type 001 means Account and so on
p3_lkid = whatId ( hidden lookup field) it is must if the merge fields are there in template
p24 = additional email to be added as addional
retURL = returning URL
p5 = stops adding more BCC
p26 = to change the domain from which you are sending
template_id - Email Template Id, It can have merge fields.
save = 0, means send the email automatically and return to retURL ,( leave it if you just need to see the screen with populated fields)
The aforementioned fields are standard fields provided from Salesforce side. These arent customizable but you can specify values for this as per your need and requirements. You can give merge fields values over there and that may help.
how it can be done with lead object...can u give a URL for that?? thnxs.
ReplyDeleteReally it was an awesome article...very interesting to read..You have provided an nice article....Thanks for sharing..
ReplyDeleteDigital Marketing Training in Chennai
Digital Marketing Course in Chennai
cloudkeeda
ReplyDeletewhat is azure
azure free account
azure data factory
cloudkeeda
cloudkeeda
cloudkeeda
Explore the ultimate Garrys Mod game server experience! Host your own server for endless gaming fun with friends.
ReplyDelete