Tuesday, 31 March 2020

Be careful while updating Dynamics 365 CE record with Multi select field using Microsoft Flow/Power Automate

Hi Everyone,

I was exploring Microsoft Flows today and was trying to create and update records with different data types. While testing observed that Multi Select values are getting overridden and it is understandable as well. However, we might have to take care it while implementing.

For example, if I am updating a record for which Multi select value is already selected and I would like to select some more. In this scenario if you set the field to consider the new value, the system will remove existing values and updates the record with the value whatever that was set by us. 

Lead - My First Lead has values as Printers for Product Interest.
In flow, I am updating that to Laptops and Mobiles.

After I ran the flow, the previous value "Printers" is no where selected on the record.

To fix this issue, we have to retrieve the record before we update and set Multi-select field with the concatenation of existing values and new values. 

Set the existing value in the variable.
Use Concat function while setting the field. Here the expression which I have used.

Syntax - concat('767070000',',','767070001',',',variables('ProductInterestExistingValues'))Here is the updated record.

Hope this helps.

--
Happy 365'ing
Gopinath

No comments:

Post a Comment