Hello all, In this blog, we will get to know how to update records using Salesforce flow. For updating the related object records we can use many available different methods, here we will understand it with the help of flow. As flow is quite helpful for updating the related object records.
How to Create Flow to Update Related Object Records
Step 1: Go to the Quick Find Box and then search ‘Flow’ and Click it.
Step 2: Click the ‘New Flow’ and then select ‘Record Trigger Flow’ and Click ‘Create’.
Don't forget to check out: OAuth 2.0 Device Authorization Flow in Salesforce
Step 3: Now create a flow with Object as Contact and Trigger the flow on – A Record is Created and Set Entry Condition as Account Lookup field on Contact and optimize the flow for Action and Related Records.
Step 4: Use ‘Update Record’ as the element and fill in the information of Label, Description and How to find records to update and set their value as below options:
- Use the contact record that triggered the flow.
- Use the IDs and all field values from a record or record collection.
- Specify conditions to identify records, and set fields individually.
Here we will use ‘Specify conditions to identify records, and set fields individually’ as we have to update related records.
- Update Record of this Object Type – Select the object on which you want to perform the update operation.
- Filter Account Record – Here select ‘All Conditions are Met(AND)’ and match the id of the account record in the contact lookup field. This will only update those Account records whose ID is present in Contact Lookup Field.
- Set Field Value for Account Record – Here we have to set the value for the accounting field which we want to update and assign updated value accordingly.
Step 5: Click on ‘Done’ and our flow is successfully configured.
Check out another amazing blog by Bhawana here: What is External ID in Salesforce - The Definitive Guide
Step 6: Click on ‘Save’ and Now give the name to our flow and again click on ‘Save’.
Hence our flow is saved successfully, Now Click on ‘Activate’ to Activate the flow.
After creating a contact for a particular account and the account field is updated using this flow.
Hence this is all about Related Records Updation with the help of Salesforce Flow.