cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tinoac123
Frequent Visitor

Updating Salesforce Multi-Select Picklist Field

Hi,

 

I'm building a flow to append values to a Salesforce multi-select picklist field (Salesforce doesn't have this functionality natively built in, probably because they want people to stay away from multi-select picklists. Alas.)

 

In short, what my flow is supposed to do is, when an Event Registration record is created for an Event, it gets the Event's "Related Regions" multi-select field values and adds them to the "Regions of Interest" multi-select picklist field on the Contact record associated with the Event Registration record.

 

How I've set up my flow to do this, when an Event Registration Record is created:

1. Get Contact record associated with Event Registration record

2. Get Event Record associated with Event Registration record

3. Initialized a "Region Interests" string variable with the existing Regions of Interest on the Contact Record.

4. Append the string variable with the Event's "Related Regions" picklist field value(s).

5. Used a Compose action to get the outputs of the Region Interests variable.

6. Using an Update Salesforce Record action, using the Dynamic Content option, I input the Outputs of my Compose action into the array input for the "Regions of Interest" field on the Contact record. To note, I clicked the button next to the field on the contact record "Switch to input the entire array", which is where I am placing the "Outputs" from my Compose action on the Regions of Interest field.

tinoac123_0-1605026003918.png

 

When I run a test, I get this error:
Salesforce failed to complete task: Message: Regions of Interest: bad value for restricted picklist field: ["Africa","East Africa—Eritrea","East Asia—Korea"]
clientRequestId: fe6f1dfe-4ed6-4736-b1bd-ed1fa67b7517

 

 

My Output from the compose action looked like this:

 

 

["Africa","East Africa—Eritrea","East Asia—Korea"]

 

 

 

I thought there was something wrong in my schema or formatting. However, after some unsuccessful attempts at solutions, I tried to just copy and paste the above into the Regions of Interest input on the Contact record, and it worked (see below).

tinoac123_1-1605026676489.png

 

 

So, I know my schema is correct, and the values are fine (not "bad" picklist values, like the error suggested).

 

Is the Compose action messing with how things are formatted? Is it that I'm using a String variable instead of an array? (If I need to use an array variable, what would be the schema?) How do I get the properly formatted array into that field?

 

I used the advice from this post but it didn't bring me to the right solution: https://powerusers.microsoft.com/t5/General-Power-Automate/Updating-record-in-Salesforce-with-multi-...

2 REPLIES 2
tinoac123
Frequent Visitor

I solved this by Initializing an Array variable an Appending to that instead. I didn't have to input any schema for the value on the append, on the the Dynamic Content picklist field value from Salesforce for the pertinent record.

mcin9781
Community Support
Community Support

Thank you for your follow up on this issue Tinoac123 I am sure it will help other users that are having the same issue.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Users online (3,284)