Multi Select Option Sets were introduced in version 9.0 of Microsoft Dynamics 365 CRM. D365CE Multi Select Option Sets are a great new capability. The way to apply business rule functions to a Multi Select field is to use JavaScript.
Multiselect Option Sets are also limited in the case of Workflows. We can not select these fields in a condition nor modified in an update record step. The field will not even appear on the update record form. However, the field can still be selected as a trigger for the workflow.
If we want to append Multiselect option set values, we can use Microsoft flow.
NAVIGATION STEPS:
Step 1: Sign in to Power Automate.
Step 2: Choose the Environment where we need to create a flow.
3rd Step: Select My flows from the navigation bar.
Step 4: Click on New to create a flow.
5th Step: Specify a Name for the flow and then choose the trigger point when flow need to be started.
SCENARIO:
Let assume that, we are having two entities Contact (Parent) and Campaigns (Child) with 1: N relationship between them.
We have two fields called Policy Interest_Campaign and Regional Interest_Campaign. Field type is Multi select option set in Campaigns entity.
We have two fields called Policy Interest_Contact and Regional Interest_Contact. Both are of type Multi select option set in Contact entity.
However in this scenario, if the Policy Interest_Campaign and Regional Interest_Campaign contain value then append it to Policy Interest_Contact and Regional Interest_Contact.
Step 6: Choose the Trigger condition from the options and choose the entity as Campaigns.
7th Step: Get the records from the Campaigns.
Step 8: Get the records from the Contacts.
9th Step: Initialize two variables for Campaigns.
Step 10: Initialize two variables for Contacts.
11th Step: Check condition for Policy Interests/Regional Interests is not equal to Null, which are in the Campaign record.
Step 12: Fetch records of contacts associated with the selected Campaign.
Step 13: Check condition for Policy Interest is equal to Null, which is in the Contact record.
14th Step: If yes, append the values from Policy_Interest_Campaign to Policy_Interest_Contact.
In Append to String Variable Action. In the place of Name, choose the variable Policy_Interest_Contact and Value as which values. We need to append (Policy_Interest_Campaign field in Campaign entity).
Step 15: Update the Contact record. Choose the item ID value and the field (Policy Interests) which we need to update.
Step 16: If Policy_Interest_Contact contains values. In Append to String Variable, In the place of Name choose the variable Policy_Interest_Contact.
Multiselect option values appended using “,” (comma). In the Value as which values, we want to append (,) (Policy_Interest_Casmpaign field in Campaign entity).
Step 17: At the end update the Contact record. Choose the item ID value and the field (Policy Interests) which we need to update.
18th Step: Repeat Step 13 to Step 17 for Regional Interest.
No comments:
Post a Comment