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

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

I have the same question (0)
  • cloflyMao Profile Picture
    25,210 on at
    RE: many to many relation

    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
    RE: many to many relation

    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
    on at
    RE: many to many relation

    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

Responsible AI policies

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

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 136 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 96

#3
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 70

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans