You need to sign in to do that
Don't have an account?

template of emailFields in publisher.setActionInputValues
In order to send an email with a predefined email template (from the case feed email action), I am using this code (based on the example in p.29 in https://resources.docs.salesforce.com/sfdc/pdf/case_feed_dev_guide.pdf):
However, the template parameter has no effect on the email (the email body contains only the string 'content'). If the body parameter is omitted, the email body is empty. I couldn't find any example for usage of the template parameter in the online documentation, has anyone tried already to use it and can provide a code sample?
function emailSolution(content) { Sfdc.canvas.publisher.publish({name: 'publisher.selectAction', payload: { actionName: 'Case.Email'}}); Sfdc.canvas.publisher.publish({name: 'publisher.setActionInputValues', payload: { actionName: 'Case.Email', emailFields: { template: 'folderName/templateName', body: { value:content, format:'richtext', insert: true} } }});
However, the template parameter has no effect on the email (the email body contains only the string 'content'). If the body parameter is omitted, the email body is empty. I couldn't find any example for usage of the template parameter in the online documentation, has anyone tried already to use it and can provide a code sample?
Sfdc.canvas.publisher.publish({name: 'publisher.selectAction',
payload: { actionName: 'Case.Email'}});
Sfdc.canvas.publisher.publish({name: 'publisher.setActionInputValues',
payload: {
actionName: 'Case.Email',
emailFields: {
template: {id: id},
}
//emailTemplate:{id:id}
}});
https://developer.salesforce.com/docs/atlas.en-us.case_feed_dev.meta/case_feed_dev/case_feed_dev_guide_component_interactions.htm