web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
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}}
I have the same question (0)
  • cloflyMao Profile Picture
    25,210 on at

    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

  • JacquesNL Profile Picture
    800 on at

    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,210 on at

    Hi Jacques,

    Your workaround sounds great.

    Welcome to submit any thought to Ideas forum.

    Regards,

    Clofly

  • Suggested answer
    Defne Ayanoglu Profile Picture
    Microsoft Employee on at

    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

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Manoj - ManoVerse Profile Picture

Manoj - ManoVerse 57 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 54

#3
Ayesha Wajahat Profile Picture

Ayesha Wajahat 14

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans