Update Salesforce checkbox from mulesoft

Hello, In this article we will discuss how we can Update Salesforce checkbox from mulesoft. Learn connecting Salesforce with mule HERE.

Setup to Update Salesforce checkbox

In my Salesforce org. I have created two check boxes. Checkbox 1 and Checkbox 2 are unchecked for now as shown in Image given below.

Update Salesforce checkbox

Create flow to Update Salesforce checkbox

Just like we did to update SFDC picklist HERE we need to choose Operation as Update and Object name. Since I am using Case object so I have kept it as the case. Then datasense will flow the metadata to the transform message you might want to add before the Salesforce. Flow and Salesforce connector is shown in the Image below:

Update Salesforce checkbox mulesoft

In transform message, we need to add the Id of record along with API names for fields we want to update. In order to check a checkbox, we need to pass the value for that field as true. Similarly passing the value as false will uncheck the check box.

Checkbox values should be passed as booleans, Passing true or false as string will give the failure from salesforce.

In dataweave, if we use true or false directly they will be taken as boolean but If we want to convert a string to boolean in dataweave we should use as :boolean in dataweave. Please refer the Image below:

Dataweave to update salesforce checkbox


That was quite easy

So, When we will run this flow It will update both the checkbox in Salesforce to true. So that why I say Mulesoft is the great tool just like ABC. Very easy and can do pretty much anything.

The same things are also demonstrated in the Video given below.

If you face any issue here. Watch this on YouTube by clicking HERE

If you like this work, Like, share and comment the section below. Also, let me know if you want me to share something.

Leave a Reply

%d bloggers like this: