Update Related Record Using Salesforce Flow - A Complete Guide: Rajat Shende

Update Related Record Using Salesforce Flow - A Complete Guide
by: Rajat Shende
blow post content copied from  Forcetalks
click here to view original post


Sometimes we have to update related object records. For updating the related object records we can use different methods but for now, we will use Flow. Flow is very helpful for updating the related object records.

How to Create Flow to Update Related Object Records

Step 1: Go to Quick Find Box and search ‘Flow’. And click on it.

Step 2: Click on the ‘New Flow’ button and select ‘Record Trigger Flow’ and click on ‘Create’. Here I update related records using ‘Record Trigger Flow’.

Step 3: Here I want to update ‘Industry Field on Account to Agriculture’ when a Contact is Created. So that I created one flow as -

  1. Object – Contact
  2. Trigger the flow on – A Record is Created
  3. Set Entry Condition – Account lookup field on Contact Should not equal to ‘null’.
  4. Optimize the flow for – Action and Related Records

Note - ‘Action and Related Records’ is used for action after the record is saved to the database. This means it is used for updating the related object records, sending emails and also for other actions.

dont miss out iconDon't forget to check out: Explore Record Triggered Flow | Learn Salesforce Lightning Flows | Flow Builder Videos


Step 4: Use ‘Update Record’ as your element. And fill the information in it as -

  1. Label - Give a label to your ‘Update Record’ Element.
  2. Description – Give Description to your Element.
  3. How to find Records to update and set their value -
    • 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 I use ‘Specify conditions to identify records, and set fields individually’ because I want to update related records.

  • Update Record of This Object Type – Select the object which you want to perform the update operation. Here I select ‘Account’ as my object.
  • Filter Account Record - Here I use ‘All Conditions Are Met (AND)’ and match the id of the account record in the Contact lookup field. Which only update those Account record whose id present in Contact Lookup Field.
  • Set Filed Value for Account Record - Here you have to set the value for the account field which you want to update and assign updated value accordingly. Here I use ‘Industry’ field and assign ‘Agriculture’ value in it.

dont miss out iconCheck out another amazing blog by Rajat here: Lookup Relationship in Salesforce - Here's All You Need to Know

Step 5: Click on ‘Done’. Hence your flow configures successfully now.

Step 6: Click on the ‘Save’ button which is a right corner. Now give the name to your flow and also give a description of it. And again, click on ‘save’.

Hence your flow saves successfully, Now clicks on ‘Activate’ to Activate your flow.

After creating a contact for a particular account then account industry filed updated to ‘Agriculture’ using this flow.

I hope this information will be helpful for you.

Thank You.

The post Update Related Record Using Salesforce Flow - A Complete Guide appeared first on Forcetalks.

July 19, 2022 at 06:55PM
Click here for more details...

The original post is available in Forcetalks by Rajat Shende
this post has been published as it is through automation. Automation script brings all the top bloggers post under a single umbrella.
The purpose of this blog, Follow the top Salesforce bloggers and collect all blogs in a single place through automation.