1

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

  • Can you clarify as referring a custom object field in email template? You already have that available using merge fields on email template, and that merge fields are the only way you can access data in an email template. – Jayant Das Jan 31 '19 at 16:13
  • Well using Lighting Email Templates there is option to choose the object as with Standard Templates. – Andrew L. Jan 31 '19 at 16:54
  • I am not able to figure it out in my dev org, a screenshot here could be helpful. – Jayant Das Jan 31 '19 at 17:16
1

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.

| improve this answer | |
  • Glad to hear, which method did you use? – shmuels Feb 20 '19 at 18:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.