Hello,
I am trying to add dynamic content to an email template. In this example I have a custom entity called Event Scheduling. On the entity form there is a lookup field called Event Name that looks to the custom Event entity. In the email template I am trying to pull in the event name for the subject line. Below is one of the many ways I have tried to do this based on articles I've read. It seems like this one should be the winner but when the email is sent the subject line is blank (it comes through blank with all other code I've tried as well). The template is converting the code like it's understanding but I get nothing in the email. I added the Business Unit line as a test and that comes through in the email so my thought is that it's an issue due to a custom entity being used. (?) Any help with this is greatly appreciated.
{!prefix_eventscheduling:prefix_eventname/@name;}
Hi,
It's so strange.
I have created two custom entities(Custom and Custom1), Custom and Custom1 is 1:N relationship.
In the following screenshot, there is a lookup field from custom entity in the custom1 form.
Then i created following email template:
Finally, i tried to add the template to email:
Regards,
Leah Ju
Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.
No, not only with the Event Name. I've tried other fields as well that also happen to be custom entities and the same thing is happening. Doesn't matter whether I put them in the Subject line or the body of the email. The fields are definitely filled in on the form.
Hi lawilliams713,
Specifying dynamic values from out of the box entities is pretty simple but there are some instances when we might want to add dynamic values from custom entities. To which we don’t have any straight forward approach in CRM as we cannot add custom entity in email template.
As you mentioned, “On the entity form there is a lookup field called Event Name that looks to the custom Event entity.”
If you want to add lookup value, you need use following synax:
{!EntityLogicalName:FieldLogicalName/@name;}
For more details, you can refer following link:
(+) Insert dynamic values in Email Templates from Custom Entities - Microsoft Dynamics 365 Community
Firstly, you need check the logic name for the entity and field.
Then you need ensure that regarding field is filled with Event Scheduling value, and lookup field--Event Name that in the Event Scheduling entity is not null.
Regards,
Leah Ju
Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.
Hi,
Thank you for your query.
Does it happen with only the Event name? Did you try anything another field in this Subject?
Also, please make sure this particular Event Scheduling record has Event lookup filled in.
Adis
136
Super User 2025 Season 1
Sohail Ahmed
81
Jonas "Jones" Melgaard
77
Super User 2025 Season 1