Skip to main content
Community site session details

Community site session details

Session Id : m/PdMln767gD0LS3K6ozHM
Power Automate - Building Flows
Answered

Trigger on create N:N Relationship in CDS

Like (0) ShareShare
ReportReport
Posted on 29 Jan 2020 06:07:19 by 24

Hi,

 

We are migrating workflows to flows and the data model is fixed. We have a requirement to trigger a flow when a relationship is established between two entities in a N:N relationship. Since CDS creates a third entity in between to do the mapping, the idea was to take the CDS (current environment) trigger and configure it on the create of the in between mapping entity as "xxx_xxx_entity1_xxx_entity2. We also tried to suffix it with "Set", but the trigger gets corrupted saying the entity is not present in the metadata cache.

 

However, whatever we try, the flow is not getting hit. No run history is present neither. Is this caused because it is an "invisible" entity? Is there a workaround to achieve this? Since it's a migration, there is no possibility to create the "third" entity ourselves.

 

 

  • NielsD Profile Picture
    24 on 31 Jul 2020 at 07:30:25
    Re: Trigger on create N:N Relationship in CDS

    Thanks a lot, did the trick

  • Verified answer
    yashag2255 Profile Picture
    24,647 Super User 2024 Season 1 on 31 Jul 2020 at 05:32:31
    Re: Trigger on create N:N Relationship in CDS

    Here is one way you can do it: https://www.bythedevs.com/post/trigger-a-flow-when-a-record-is-created-in-an-n-n-relationship-entity-in-cds

     

    Hope this Helps!

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • NielsD Profile Picture
    24 on 22 Jun 2020 at 09:48:11
    Re: Trigger on create N:N Relationship in CDS

    Hi

     

    No I'm still figuring this one out. Currently on the long-term shelf though

     

    Kr

  • DaxjKent Profile Picture
    108 on 21 Jun 2020 at 20:38:09
    Re: Trigger on create N:N Relationship in CDS

    Did you ever come up with a solution or work around on this?

  • H Sheild Profile Picture
    3,000 Most Valuable Professional on 30 Jan 2020 at 07:14:54
    Re: Trigger on create N:N Relationship in CDS

    Hi,

     

    I am also trying to figure out the same thing.  I don't think it is possible though.

     

    I can create the Flow in the same way as @Niels_. The Flow saves fine without errors and I can even refer to the intersection attributes that are outputs of the trigger action in the following actions in the Flow.  The Flow just doesn't trigger when the intersection record is created.

     

  • NielsD Profile Picture
    24 on 30 Jan 2020 at 06:58:36
    Re: Trigger on create N:N Relationship in CDS

    Hey @v-alzhan-msft ,

     

    Unfortunately, I'm not able to do that, since it is an intersect entity, created behind the scenes on the N:N relationship. However, the trigger is registered since I do not get an error when saving the entity is not present. So it does exist! So this should trigger when creating an N:N relationship.

     

    Kind Regards

     

    Niels

  • v-alzhan-msft Profile Picture
    on 30 Jan 2020 at 06:29:29
    Re: Trigger on create N:N Relationship in CDS

    Hi @Niels_ ,

     

    Could you please choose the entity from the drop down list in the trigger?

     

    Best regards,

    Alice       

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • NielsD Profile Picture
    24 on 30 Jan 2020 at 05:27:31
    Re: Trigger on create N:N Relationship in CDS

    Hi Alice,

     

    Thank you for your reply.

    I've added the screenshot. It's a really simple flow to just see if I get it to work. But the trigger doesn't seem to be hit.

    screenshot.JPG

     

    Thanks!

  • v-alzhan-msft Profile Picture
    on 30 Jan 2020 at 01:20:57
    Re: Trigger on create N:N Relationship in CDS

    Hi @Niels_ ,

     

    Could you please share a screenshot of the configuration of your flow?

     

    Best regards,

    Alice       

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • NielsD Profile Picture
    24 on 29 Jan 2020 at 06:10:39
    Re: Trigger on create N:N Relationship in CDS

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2