How to do it...

Carry out the following steps to create new Opportunity Field History records whenever the desired opportunity fields are updated using Lightning Process Builder:

  1. Click on the Setup gear icon in the top right-hand of the main Home page, as shown in the following screenshot:
  1. Click the Setup option, as shown in the following screenshot:
  1. Type the text process builder in the Quick Find search box, as shown in the following screenshot:
  1. Select the Process Builder option.
  2. Click on New located on the top right of the page.
We will be presented with the New Process. dialog. The dialog initially shows the two fields, Process Name and API Name, and there is a scroll bar to navigate to additional fields.
  1. Enter Opportunity Field History in the Process Name textbox.
Upon clicking out of the Field Label textbox, the API Name value changes to Opportunity_Field_History.
  1. Optionally, enter details in the Description field.
  2. In the The process starts when * picklist, select A record changes.
  3. Click on Save.

We will be presented with the Process Builder process setup page, as shown in the following screenshot:

  1. Click on Add Object.

We will be presented with the Choose Object and Specify When to Start the Process page.

  1. Choose Opportunity in the Object * picklist.
  2. Select the when a record is created or edited for the Start the process * option.
  3. Leave the Advanced option unchanged.
  4. Click on Save, as shown in the following screenshot:
  1. Click on Add Criteria.

We will be presented with the Define Criteria for this Action Group page.

  1. Enter Stage Change in the Criteria Name * field.
  2. Choose Formula evaluates to true for the Criteria for Executing Actions * option.
  3. In the Build Formula section, enter or paste the following:
ISCHANGED( [Opportunity].StageName )
  1. Leave the Advanced option unchanged.
  2. Click on Save, as shown in the following screenshot:

Click on Add Action, in IMMEDIATE ACTIONS.

  1. Choose Create a Record, as shown in the following screenshot:
Upon selecting the Create a Record option, the Action Name * and Record Type * fields are presented.
  1. Enter New Opportunity Field History in the Action Name * field.
  2. Select Opportunity Field History in the Record Type * selection.
Upon selecting the Record Type *, the Set Field Values section is presented.
  1. Select the following for the Field *, Type *, and Value *: Opportunity, Field Reference, [Opportunity].Id.
  2. For the second row, select the following for the Field *, Type *, and Value *: Opportunity Field History Name, Formula, [Opportunity].Id.
  3. For the third row, select the following for the Field *, Type *, and Value *: Stage Original Value, Formula, PRIORVALUE([Opportunity].StageName).
  1. For the fourth row, select the following for the Field *, Type *, and Value *: Stage New Value, Formula, TEXT([Opportunity].StageName).
  2. Click on Save, as shown in the following screenshot:
  1. Click on Activate in the top right-hand of the Process Builder page.
  2. Click on Confirm in the Activate Version dialog, as shown in the following screenshot:
..................Content has been hidden....................

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