In this scenario our business requirement is that when an accounts address is updated you need to update all the related contact addresses with the same data. The scenario involves the synchronization of fields between entities where a one to many (1:N) relationship exists.
North52 Decision Suite Solution
The North52 Decision Suite solution works like this,
- We create a formula that fires for just updates on the account entity where any of the address1 fields change
- The formula itself retrieves all the contacts associated via the parentcustomerid field on the contact entity
- It will then loop over all the contacts and update the address information with that of account entity
North52 Decision Suite Steps
The following set of steps assumes you are just using the out of the box Dynamics 365 setup. But its easy to enhance if you have extra fields \ requirements.
- Create a new formula of type 'Save - Perform Action'
- Set the Event field to just 'Update'
- Set the Source Entity to 'Account'
- Set the Source Entity Property (hold down control key to multi-select) to address1_line1, address1_line2, address1_line3, address1_city, address1_postalcode, address1_country
- Copy & paste the formula below into the formula description field & click save
- You are ready to test
ForEachRecord( FindRecords('contact', 'parentcustomerid', [account.accountid], 'contactid'), UpdateRecord('contact', CurrentRecord('contactid'), SetAttribute('address1_line1', [account.address1_line1]), SetAttribute('address1_line2', [account.address1_line2]), SetAttribute('address1_line3', [account.address1_line3]), SetAttribute('address1_city', [account.address1_city]), SetAttribute('address1_postalcode', [account.address1_postalcode]), SetAttribute('address1_country', [account.address1_country]) ) )
Wizard - FindRecords
Did you know?
North52's TestShield helps overcome business challenges associated with testing
Organizations are aware of the need to automate tests yet find that they revert to manual testing processes. Some of the main reasons for this include:
- End to end testing is difficult
- Release cycles for features are shorter
- Technical skills not available