Please wait, loading...

 

Associate or Disassociate Records for 1:N or N:N Relationship using Power Automate Relate Action CDS

August 14, 2020

We can Associate or disassociate two entity record with N:N or 1: N relationship using Power Automate
Connector to use: common data service (current environment)
Action to use: Relate Records

We would be using Contact and campaign N:N Custom Relationship when Contact is created get source campaign from lead and map with contact.

  1. Create new Automated Flow

  2. Name the Flow and Choose Trigger, in our case its creation of record contact

  3. Get Lead Record Item Unique id as Lead Source, To get source Campaign ID

  4. Now We have Source Campaign ID from Lead and Contact Id, But to use relate Action we need OData URL for a related entity that is Campaign
    https://organizationName.crm8.dynamics.com/api/data/v9.0/campaigns(0d8dda4c-126e-e911-a980-000d3ae4c063)
    Where GUID will be mapped with Dynamics field value campaign ID

  5. Selecting Action Relate record this action, Select Primary Entity i.e contact, Map Contact unique id, Relationship Name, URL

Save and Turn On the flow. Now each time contact is created and source lead contains campaign both will be associated using relate action.

Unrelate Action can be used to Disassociate the record same way.

https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/04/Microsoftdynamics365.png?fit=640%2C651&ssl=1
Microsoft Dynamics Community Profile

Learn more