Adding Record Update elements to a Flow

The Record Update element allows you to update a group of records in Salesforce using Input, Constant, Variable, or other values from the Flow. This allows you to update either a single record or multiple records at a time depending on how you fixed the filter criteria. Now, we will add a Record Update element onto the canvas:

  1. Click on the Palette tab and drag and drop the Record Update element onto the canvas; this will open a new window, where you have to enter the following details:
    • Name: Enter the name for the Record Update element. In this case, enter Update account rating as the name.
    • Unique Name: This will be autopopulated based on the name.
    • Description: Write some meaningful text so that another developer/administrator can easily understand why this Record Update element was created. When you select the Record Update element in the Explorer tab, the description appears in the Description pane.
    • Update: Select the object for which you want to update the record. In this case, select the Account object.
    • The next task is to set filter the criteria to identify which record gets updated; in this case, select Id as {!VarTAccountID}. Then, select the fields from the object that you want to update and assign the value or resource (input, Constant, and so on) to the data type, which must match. In this case, select the Rating field, and for the value, from the PICKLIST VALUES dropdown, select Cold. To add multiple fields, click on the Add Row link.

This will look like what is shown in the following screenshot:

  1. Once you are done, click on the OK button.
  2. Set the Record Update element, Update account rating, as the Start element, as shown in the following screenshot:
  1. Save the Flow with the name update an account and close the Flow Designer using the Close button; this will redirect you to the Flow Detail page. Don't forget to activate the Flow.
  2. From the Flow Detail page, copy the unique URL; it will look like /flow/Update_an_account.
  3. Now we will create a custom button on the account object to launch the Flow. To create a custom button, navigate to Setup | Build | Customize | Accounts | Buttons, Links, and Actions and click on the New Button or Link button. Enter the Name field as Update Rating; for Display Type, select Detail Page Button; for Behavior, select Display in existing window without sidebar or header; for Content Source, select URL, and construct the URL. At the end, a custom button URL will look like this: /flow/Update_an_account?VarTAccountID={!Account.Id}&retURL={!Account.Id}.
  1. Once you are done, click on the Save button.
  2. The next task is to add a custom button on a page layout. Navigate to Setup | Build | Customize | Accounts | Page Layouts, click on the Edit link, and drag and drop a custom button, Update Rating, onto the page layout, and click on the Save button to save the changes.
  3. To test this, identify an account record and go to the account details page; click on the Update Rating button.

Flow will update the account status to Cold, as shown in the preceding screenshot. You can use this concept to create a wizard that allows your users to update the Opportunity stage by a single click. Also, make sure your Flow sets all fields to values that meet your active validation rules.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.184.189