Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Can't select dynamic fields from proper relationship (Marketing emails)

(0) ShareShare
ReportReport
Posted on by 800

Hi,

I am setting up D365 Marketing and creating marketing email templates. We are using the API  in combination with a custom form to create event registrations. That works great.
But now I would like to e-mail these persons who registered for an event. When creating the marketing email templates I noticed when using the assist function I did not see the relationship I needed:
Event Registration -> Contact. What I did see was the relationship Contact -> Event Registration, which is the wrong one.

The bottom line is, I want to email persons who registered for a particular event with specific information regarding that event. My Segments and Customer Journeys are set on specific events, how do I configure my emails to specific events and/or event registrations?

What I want to achieve is to get the GUID in this line of code to be dynamic:

{{msevtmgt_event(1235363d-d7ab-ea11-a812-000d3a49e531).msevtmgt_eventstartdate}}
  • Suggested answer
    Defne Ayanoglu Profile Picture
    on at
    RE: Can't select dynamic fields from proper relationship (Marketing emails)

    Hi Jacques, 

    Feel free to shoot your Ideas to our Ideas Forum, and don't forget to Verify the answers that you find useful. 

    Thanks!
    Defne

  • cloflyMao Profile Picture
    25,208 on at
    RE: Can't select dynamic fields from proper relationship (Marketing emails)

    Hi Jacques,

    Your workaround sounds great.

    Welcome to submit any thought to Ideas forum.

    Regards,

    Clofly

  • JacquesNL Profile Picture
    800 on at
    RE: Can't select dynamic fields from proper relationship (Marketing emails)

    Hi Clofly,

    Thank you for the reply, I understand your solution, but this is not the solution because it is not variable. It is still written with a hardcoded GUID. It surprises me that this is not possible to create a variable solution.

    I am trying the following workaround: Everytime a event registration is created (or the event lookup on it changes), I update the Originating Event field on the related contact with the Event lookup from the Event Registration. Then I am using the Contact - Originating Event relationship in the assist-edit to get the needed event info. Can't seem to find another way.

    Thanks again!

    Br,

    Jacques

  • cloflyMao Profile Picture
    25,208 on at
    RE: Can't select dynamic fields from proper relationship (Marketing emails)

    Hi Jacques,

    The relationship between Contact and Event is 1:N, in other word, a contact may has multiple event registrations from different events, therefore, we need to loop through all associated records of current contact with #each statement,

    then using a conditional statement to only show information of a specific event.

    {{#each contact.msevtmgt_eventregistration_contact_msevtmgt_contactid}}
        {{#if (eq this.msevtmgt_event '1235363d-d7ab-ea11-a812-000d3a49e531')}} 
        

    Hi {{contact.firstname}},

    The event {{this.msevtmgt_name}} will start on {{this.msevtmgt_eventstartdate}}

    {{/if}} {{/each}}

    Please refer to following articles for more details about explanation of relationship in assist-edit:

    https://docs.microsoft.com/en-us/dynamics365/marketing/dynamic-email-content#how-assist-edit-presents-database-relationships

    and how to loop through records with 1:N relationship:

    https://docs.microsoft.com/en-us/dynamics365/marketing/dynamic-email-content#for-each-loops

    Regards,

    Clofly

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

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 > Customer experience | Sales, Customer Insights, CRM

#1
Holly Huffman Profile Picture

Holly Huffman 103

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 96 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 51 Most Valuable Professional

Product updates

Dynamics 365 release plans