Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Email template dynamics content from custom entities

(0) ShareShare
ReportReport
Posted on by 45

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;}

Screenshot-_2800_8_2900_.png

  • Community Member Profile Picture
    on at
    RE: Email template dynamics content from custom entities

    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.

    pastedimage1627457614473v2.png

    Then i created following email template:

    pastedimage1627457565509v1.png

    Finally, i tried to add the template to email:

    pastedimage1627457801994v3.png

    pastedimage1627457830480v4.png

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

  • lawilliams713 Profile Picture
    45 on at
    RE: Email template dynamics content from custom entities

    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.

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Email template dynamics content from custom entities

    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.

  • Suggested answer
    Wahaj Rashid Profile Picture
    11,321 on at
    RE: Email template dynamics content from custom entities

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

News and Announcements

Now Available: 2025 Release Wave 2

Quick Links

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Adis Profile Picture

Adis 136 Super User 2025 Season 1

#2
Sohail Ahmed Profile Picture

Sohail Ahmed 81

#3
Jonas "Jones" Melgaard Profile Picture

Jonas "Jones" Melgaard 77 Super User 2025 Season 1

Product updates

Dynamics 365 release plans