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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

many to many relation

(0) ShareShare
ReportReport
Posted on by 20

Hello,

i have a custom entity named "subscription". I created a new n:n relation named "new_new_subscription_contact".

Now i want to create an marketing email where i can display all subscriptions a contact has.

I have played around with 1:n relations :

{{#each contact.lead_contact_parentcontactid}}
     {{this.subject}}
{{/each}}

This example is working for me. 

I have no idea how to implement a for each loop with n:n relation.

Thanks for you help

Ulrich

  • cloflyMao Profile Picture
    25,210 on at

    Hi Novia,

    Can you find other relationships(1:N or N:N) in marketing email assist-edit besides N:1?

    I don't know why 1:N or N:N have been removed in assist-edit in my current version(9.1.0000.13225) even if I had configured sync setting for my custom entity.

    To enable a custom entity that has any relationship to contact entity in marketing email, please do follow steps:

    1. Configure sync setting for custom entity: 

    https://docs.microsoft.com/en-us/dynamics365/marketing/mkt-settings-sync

    2. In previous edition, you shall see all available relationships for contact in assist-edit: 

    https://docs.microsoft.com/en-us/dynamics365/marketing/dynamic-email-content#use-assist-edit-to-place-a-dynamic-expression

    If you can't find the relationship you want, try to add it manually.

    3. I also created a Subscription entity(N:N to contact), and I can find the relationship name in segment query view:

    pastedimage1581681171371v1.png

    copy the relationship.

    4. In marketing email, add following for each loop expression 

      Your Subscription: {{#each contact.new_new_subscription_contact_new_subscription_contact}}
    • {{this.new_name}}
    • {{/each}}

    Then create a simple customer journey for test.

    Regards,

    Clofly

  • Novia Consult Profile Picture
    20 on at

    Hello Clofly,

    thank your for your help.

    Unfortunately the for each loop does not show any data.

    I have added three records but nothing shows up.

    Regards

    Ulrich

  • Suggested answer
    Preeti Rana Profile Picture
    Microsoft Employee on at

    Hi Novia,

    The product currently doesn't support N:N relationships in this scenario for emails. N:N relationship support was added only to Segmentation. Please direct any further queries to d365mktcomm@microsoft.com 

    Thanks,
    Preeti Rana 

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 July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
11manish Profile Picture

11manish 111 Super User 2026 Season 2

#2
Syed Aqib Raza Profile Picture

Syed Aqib Raza 88

#3
ParthPatel249 Profile Picture

ParthPatel249 84

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans