web
You’re offline. This is a read only version of the page.
close
Skip to main content
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)
  • 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,210 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,210 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 258

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 170

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 116 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans