You need to sign in to do that
Don't have an account?
Davy Huijgens
Setting an EmailTemplateId in a QuickActionDefaultsHandler ignores all changes to EmailMessage
I have implemented a QuickAction.QuickActionDefaultsHandler to prepopulate the email action in the case feed in the service console.
In the handler I want to set the subject of the email, this is done like this:
This works fine, until I also set an EmailTemplate:
Now the subject just defaults back to the orignal subject of the EmailMessage targetSObject of the QuickAction.SendEmailQuickActionDefaults.
Anybody have any idea why this is happening?
In the handler I want to set the subject of the email, this is done like this:
if(sendEmailDefaults.getInReplyToId() != null){ emailMessage.Subject = 'Re: '; }else{ if(et.Subject != null){ emailMessage.Subject = et.Subject; }else{ emailMessage.Subject = c.Subject; } }
This works fine, until I also set an EmailTemplate:
sendEmailDefaults.setTemplateId(et.Id); sendEmailDefaults.setIgnoreTemplateSubject(true); sendEmailDefaults.setInsertTemplateBody(true);
Now the subject just defaults back to the orignal subject of the EmailMessage targetSObject of the QuickAction.SendEmailQuickActionDefaults.
Anybody have any idea why this is happening?
Best Answer chosen by Davy Huijgens
Davy Huijgens
For anybody finding this a case with Salesforce support resulted in stating that this is not supported and will not work.