I am studying the Dynamics 365 Marketing Email function. What I'm going to do is to find a way to list coming events within a period in emails.
The event data are stored in the entity Event, and I need the email can automatically fetch a few events' detail based on their event dates and display them in email routinely by setting up a custom email template.
I knew that dynamic fields can be used to display dynamic data. However, by using the 'Assist edit' function provided, I can only select 1 static record from entity Event (but I need to take some/all records from Event).
I also tried setting up relations between entities, so that I can retrieve all events by connecting them to a dummy contact(static record) , but the custom relationship I set is not searchable in the 'Assist edit' (maybe I have set incorrectly? The custom 1:N Relationship has set to searchable however)
Do anybody has ideas? Thanks in advance!
In addition to what Clofly Mao has said, to help identify the correct relationship name, you can try and create the relationship between the Contact and Event in the Segment's Designer tab. When finished, you can find the relationship name in the Query tab - this is the relationship name you'll need to use in the for loop.
Beware of the two-hops limit in field expressions - this goes for lookups too, if your lookup is in your second linked entity then you would only be able to get the lookup GUID as getting the lookup name is considered a 3rd hop.
Hi Serina,
You can display events of your contact with for-each loop in email content.
example syntax with HTML elements:
<p>You registration events:</p> <ul> {{#each contact.contact_event_eventid}} <li>{{this.eventname}}</li> {{/each}} </ul>
please drag Custom code to any part of your email, and edit code in Properties > Custom code
André Arnaud de Cal...
291,996
Super User 2025 Season 1
Martin Dráb
230,853
Most Valuable Professional
nmaenpaa
101,156