Update Salesforce picklist from mulesoft

Hello, In this article I will tell How to update Salesforce picklist from a mule flow. Previously I told how to add a value in picklist HERE this time we will be selecting that value. If you don’t know How to connect Salesforce with Mulesoft Go HERE first.

Update Salesforce picklist

In the record shown below for Case object in Salesforce. Present value is “Rahul” in the field “Test picklist”. I will be updating this value to “Sheokand” from a mule flow.

Update sfdc picklist

Requirements to Update Salesforce picklist

In order to update a value for a record, we need its SFDC Id updated in the image above. 2nd thing that we will need is the API name of the field. Provided, we know what value we want to update.

If the value we want to update in not there already then we may need to add that value in the picklist. Know about that HERE.

Flow we need to make

In Salesforce connector we need to select Update as operation.

Update operation accepts an Array list of hashmap and thus can be used to update multiple records in one request, whereas Update single will accept a HashMap and will update only one record.

After that, we need to choose the required object type, which “Case” in this case. The expression can be kept to the payload.

Salesforce connector is shown in the image below.

Connector to update salesforce picklist

This will flow the metadata to dataweave. In dataweave, we must add the two things Id and Picklist API name as shown below.

Mulesoft dataweave to update piclist


One thing to note here is that these picklist values are not case sensitive in this case. However, there can be a case that in SFDC they are configured to be Case sensitive.

There may be still some doubt so I have created this video given below. If there is any issue watching it here Click HERE to watch it on YouTube.

If you like this article or video, Do comment and like. Also, let me know If want me to cover something else as well.

Leave a Reply

%d bloggers like this: