Skip to main content
Tweeted twitter.com/StackSalesforce/status/1078848284532322304
added 8 characters in body
Source Link
sfdcfox
  • 501.7k
  • 21
  • 473
  • 828

Is there a way to retrieve the merge fields of a specific Lightning Email Template in Apex?

I.E.

Example

template.getMergeFields();
EmailTemplate template = new EmailTemplate();
template.getMergeFields();

I would like to validate the merge fields so that an email is not sent out with empty fields, as is the current behavior.

The EmailTemplate docs do not seem to discuss this.

Is there a way to retrieve the merge fields of a specific Lightning Email Template in Apex?

I.E.

template.getMergeFields();

I would like to validate the merge fields so that an email is not sent out with empty fields, as is the current behavior.

The EmailTemplate docs do not seem to discuss this.

Is there a way to retrieve the merge fields of a specific Lightning Email Template in Apex?

Example

EmailTemplate template = new EmailTemplate();
template.getMergeFields();

I would like to validate the merge fields so that an email is not sent out with empty fields, as is the current behavior.

The EmailTemplate docs do not seem to discuss this.

Source Link
shmuels
  • 585
  • 3
  • 20

Validate Merge Fields on a Lightning Email Template in Apex

Is there a way to retrieve the merge fields of a specific Lightning Email Template in Apex?

I.E.

template.getMergeFields();

I would like to validate the merge fields so that an email is not sent out with empty fields, as is the current behavior.

The EmailTemplate docs do not seem to discuss this.