The business requirement here is that we have a 3rd party integration creating Account records within Dynamics 365. This integration cannot set the ownerid field of the record but it can set a text field with the name of the owner. So we need to use this information to lookup the User ID value & set it to the owner of the Account record.
North52 Decision Suite Solution
The North52 Decision Suite solution works like this,
- A formula is set to execute for the create event of the Account entity
- It checks that the OwnerText field has data before it executes the main formula
- When the formula executes it uses the FindValue() function to lookup the guid of the systemuser based on the value of the OwnerText field
- It uses this guid to set the ownerid field of the Account record
North52 Decision Suite Steps
The following set of steps will set this formula up for you.
- Create a new formula of type 'Save - Perform Action'
- Set the Source Entity to 'Account'
- Set the Source Property to 'Owner Text'
- Set the Event pick-list field to 'Create'
- Copy & paste the formula below into the formula description field
- Click Save
- Ready to test.
UpdateRecord('account', [account.accountid], SetAttributeLookup('ownerid', 'systemuser', FindValue('systemuser', 'fullname', [account.new_ownertext], 'systemuserid')) )
Wizard - ClientSideDate
Please see below the wizard you can use to create the ClientSideDate() function call used in this formula.
Note to find the value for Equals Value, you will need to go to the Source tab and find the field.
Did you know?
North52 provides Automated Testing for Dynamics 365
TestShield® is a unique solution that helps you automatically test your End to End Dynamics 365/CRM and Power Automate processes. It is built on the proven and robust North52 Business Process Activities rules engine and offers the ability to repetitively test and report on your key business processes.
TestShield's key features:
- Fully integrated with Dynamics 365
- Easy to use by BA's, Testers, and Developers
- Advanced test data generation and management
- Codeless advanced testing reduces test creation time
- Test and validate across all layers with a single test