1

Is there a way to open the Email Author Layout with pre defined email template in Lightning Experience. I know that earlier we don't have the possibility to do this since LEX was not supporting the URL hacks. But as per spring 20, LEX is supporting the URL Hacks.

Classic : /_ui/core/email/author/EmailAuthor?rtype=003&p3_lkid={!Opportunity.Id}&retURL=/{!Opportunity.Id}&[email protected]&template_id=00X40000001XQwz

What is the equivalent url for Lighting Experience ??

1
  • 1
    as par of spring 20, salesforce implemented URL hacking for the new record creation like: /lightning/o/Account/new?defaultFieldValues= Name={!URLENCODE(Lead.Company)}, Type=Prospect, OwnerId={!Lead.OwnerId}, Website={!Lead.Website} theblogreaders.com/… But not for Email Author Layout, so we need to wait some more time :( Feb 25, 2020 at 10:30

2 Answers 2

1

You don't need to have any URL email hacks. If the objective is to send email dynamically composed by the user, you can enable Activities for the custom object and add quick action to send email. You can predefine the email fields also. Post that from after insert task trigger you can track the email process too.

This doesn't count against the apex daily limit. Make sure you set default and mark the Related to for the quick action as Read Only so that users cannot play around with it.

0

Yes It is possible to use an existing template on email author without any url hacks. You most probably are already using PageReference use getParameters() method of the class and set the templateId to the Id of the desired email template.

PageReference emailpage= new PageReference('/email/author/emailauthor.jsp');
Map<String, String> args = emailpage.getParameters();
args.put('p3_lkid',o.ID); //record id you want to tie the page to
args.put('template_id','00X41000001Ew1zEAC');//template id of the template

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .