6

When I go to create a Lightning Email Template, a custom object I recently created doesn't appear alongside other custom objects in the list of objects available for merge field filtering.

What do I need to configure about the custom object to appear as an option in the "Related Entity Type" merge field filter for a Lightning Email Template?

enter image description here

5
  • 4
    The usual things to check are that the object definition has Track Activities checked and is Deployed. But I'm not seeing an object that I changed to Track Activities in the list afterwards, and even tried a different browser to eliminate caching as an issue. Is the object available if you try to create a Classic template for it? Jun 26, 2019 at 21:38
  • That did it! I could have sworn I'd checked the "Allow Activities" checkbox in my troubleshooting steps... I must have forgotten to refresh the Lightning page and so didn't refresh the view for the new Email Template modal (aggressive Lightning caching is turned off). Thanks @ThomasTaylor! Jun 26, 2019 at 22:06
  • 1
    I had this issue as well. What did it for me was to relog into salesforce. It seems to be a bug that it doesnt appear in the list right away.
    – Andreas86
    Jun 28, 2019 at 12:53
  • That must have been it. Thanks for restoring my faith in my sanity, @Andreas86 Jun 30, 2019 at 5:24
  • 2
    For me, I had followed all the suggestions above, but the object was still not appearing in the Related Entity Type list. I ended up working on something else for a couple of hours, and then when I went back to try again, the object was now showing. For some reason I just had to wait a while for the object option to appear. I had tried clearing cache, and trying other browsers. The sandbox I was working in also has aggressive Lightning caching turned off.
    – Garywoo
    Oct 6, 2020 at 18:16

7 Answers 7

4

enter image description here

I found the issue and was able to resolve it. Firstly, "Track Activities" should be enabled on the object level. Then navigate to session settings and uncheck the option "Enable secure and persistent browser caching to improve performance". This prevents the browser from refreshing everytime and uses the cookies to load most of the preloaded content. After saving the session settings changes, refresh the browser 2-3 times or do a hard refresh and it should show up the custom objects in the related entity type field.

1
  • You only need to enable activities on the object. The rest of this answer is not required and probably shouldn't be done because the whole point of the "Enable secure and persistent browser caching to improve performance" settings is to make the system faster for your users.
    – Nick C
    Apr 1, 2022 at 1:52
2

I know this is quite old now but for anyone viewing this and the suggestions above dont fix the issue. I fixed this by enabling "Enhanced Email" in setup.

1

I had this issue too and it was definitely related to caching. After realizing I didn't have Allow Activities checked on the object settings page, I couldn't see it even after logging out and back in. Once I cleared my cookies for the sandbox I was in, it appeared.

1

In addition to the above (Enhanced Email on, Allow Activities), I also found that the custom object needed to have a tab created for it before it appeared in the dropdown for related entity.

1

I was missing the "Allow Activities", so I enabled it. I tried everything listed above to get it to show up. Refresh, hard refresh, cache reset. Event switched browsers. Nothing helped, so I moved on to Custom Email Templates, which worked perfectly the first time!

After I finished building the custom templates (maybe 2 hours after enabling "Allow Activities"), I went back and checked and the object is now in the list. What gives??

1

I had the same problem. The first action was to activate the option Allow Activities in the object. It did not work. I analyzed my org and made several tests, including create a Tab for the object. Nothing happened.

The problem: You cannot create email templates for child objects, i.e. your object cannot have a Master-Detail field.

Solution: I changed the relationship type from Master-Detail to Lookup and then I could create an email template for that object.

0

I followed the advice of all these replies, but couldn't get the new related object to appear until I switched out of my custom Lightning Console app (in the Lightning App Switcher) and into a default one like Service or Sales. Then I opened Email Templates from within that app and it worked for me. Seems to be related to this: https://issues.salesforce.com/issue/a028c00000gAzK0AAK/template-unique-name-and-relatedentitytype-errors-when-creating-lightning-email-template-in-console

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .