[SalesForce] Lightning Email Templates: Custom Merge Fields

Is there anyway to reference a custom object field when creating a Lightning Email Template or are we limited to the options in merge field picker? I believe it is the latter, but want to verify.

Thanks

Best Answer

Do you mean reference a custom object's lookup relationship fields?

You are definitely able to create Lightning Email Templates for a custom object, however you cannot get a hold of that object's lookup relationships fields. The only field you can reference is the name field {{{CustomObject__c.LookupRelationship__c}}} will give you the lookup's name field.

The workaround that has been suggested is to use formula fields on the custom object that reference any field you need from the lookup relationship and then use those in the template.

Here is an idea to allow it.

The docs for the HML merge language don't seem to mention that this is not possible, but I have tested it out and in HML it definitely can't be done.

I have not tested this out with the SML language; here are the docs on how to create a LEX email template with SML, but I don't think it'll be possible to pull in the relationship fields with SML either.

Related Topic