Getting Started with Process Builder – Part 6 (Update Related Quotes to Denied Except for the One That Was Accepted)

Getting Started with Process Builder – Part 6 (Update Related Quotes to Denied Except for the One That Was Accepted)

Last Updated on November 17, 2020 by Rakesh Gupta

Big Idea or Enduring Question:

How do I use automation to update an objects’ other related records?


After reading this blog, you’ll be able to: 

  • Use Process Builder to automatically update quotes associated with an Opportunity
  • Define criteria so specific records receive specific updates

Business Use case

Tamara McCleary works as a System administrator at Universal Containers (UC). They use Salesforce to manage Opportunities and Quotes, and each Opportunity can have multiple Quotes. Whenever a customer accepts a Quote, all other Quote records should have the Status updated to Denied

Automation Champion Approach (I-do):

While this can be solved using various automation tools like Apex or Flow, we will use Process Builder. This is not something that can be accomplished with Workflow Rules.

Before discussing it, let me show you a diagram of a Process Flow at a high level. Please spend a few minutes to go through the following Flow diagram and understand it.

Let’s begin building this automation process.

Guided Practice (We-do):

There are 4 steps to solve Tamara’s business requirement using Process Builder. We must: 

  1. Define process properties
  2. Define evaluation criteria
  3. Define process criteria
  4. Add action – update records

Step 1: Define Process Properties

  1. Click Setup.
  2. In the Quick Find box, type Process Builder.
  3. Select Process Builder, then click New.
  4. Name the Process and click the Tab button. The API Name will populate. 
  5. As a best practice, always input a description
  6. The process starts when A record changes.
  7. Click Save.

Step 2: Define Evaluation Criteria

  1. Click on the Add Object node to begin selecting the evaluation criteria.
  2. Select the Quote object from the dropdown list.
  3. Start the process when a record is created or edited.
  4. Click Save.

Step 3: Define Process Criteria

  1. Click the Add Criteria node to begin defining the process criteria.
  2. Name the criteria.
  3. The criteria should execute actions when the conditions are met.
  4. Set Conditions
    1. Row 1
      1. Field: Quote | Status
      2. Operator: Equals
      3. Type: Picklist
      4. Value: Accepted
  5. Select All of the conditions are met (AND)
  6. Click Advanced
  7. Select Yes to execute the actions only when specified changes are made to the record.
  8. Click Save.

The reason why we would select the Yes checkbox for the question — Do you want to execute the actions only when specified changes are made to the record? — is to allow the Process Builder to execute the actions only if the record meets the criteria now, but the values that the record had immediately before it was saved didn’t meet criteria. This means that these actions won’t be executed when irrelevant changes are made.

Step 4: Add Action – Update Records

  1. Below Immediate Actions, click Add Action.
  2. For Action Type, select Update Records
  3. Name the action.
  4. Select the option Select a record related to the Quote record type. 
  5. Select the Opportunity ID | Quotes record type. 
  6. The criteria for updating records should be Updated records meet all conditions.
  7. Filter the records you update based on these conditions
    1. Row 1
      1. Field: Status
      2. Operator: Does not equal
      3. Type: Picklist
      4. Value: Accepted
  8. Set new field values for the records you update: 
    1. Row 1:
      1. Field: Status
      2. Type: Picklist
      3. Value: Denied
  9. Click Save.

Almost there! Once everything looks good, click the Activate button. 

Note:- Before you activate your process, you will want to make sure that you have assigned data in the correct format because Process Builder obeys validation rules. If some fields are required by using validation rules, then make sure you have added those fields. Conversely, if some fields are required on the page layout, you can ignore those fields. 

Proof of Concept

Now onwards, when a business user updates the Quote Status to Accepted, Process Builder will automatically update the Quote Description and the Status on all other quotes to Denied.

  1. Currently, there are three Quotes attached to Opportunity Deer Valley Corp as shown in the following screenshot
  2. Now we update the Status on Quote 1 to Accepted and click Mark as Current Status
  3. Navigate back to the Opportunity to confirm other records are changed.

Independent Practice (You-do):

Create a Process Builder that will de-select any other Primary Contacts when a new one is selected. 

(Note: Start by creating a checkbox for ‘Primary Contact’ on the Contact object)

Formative Assessment:

I want to hear from you!  

What is one thing you learned from this post? How do you envision applying this new knowledge in the real world? 

Let me know by Tweeting me at @automationchamp, or find me on LinkedIn.

Author: - Rakesh Gupta
Technical Editor: - Andrea Stratton
Have feedback, suggestions for posts, or need more information about Salesforce online training offered by me? Say hello, and leave a message!

10 thoughts on “Getting Started with Process Builder – Part 6 (Update Related Quotes to Denied Except for the One That Was Accepted)

  1. Hi Rakesh,

    I am facing a issue when working on similar kind of scenario.

    I have 2 process one on account and one on contact.

    contact process is updating one field of all the related contacts and one field of the account related with that contact.

    Account process is updating one field on 2 contacts. (as per the business rules,it is always 2 not more than that)

    Issue is when account process is fired all contacts get updated, how can i stop the contact process ?

  2. Hi Rakesh ,

    Excellent! i have follow the same steps and testing but my other quotes not denied can you pls help out.


      1. Hi, Rakesh, I suppose I figured out what’s wrong here. Step 5, in the object selection screenshot we see ‘Quote ID’ in the end, but actually it should be ‘Quotes’ – the same as in the next screenshot below. I failed at first too, but now it works as expected.
        Many thanks for such a valuable course!

  3. Excellent! Got it! One thing, I was not able to add the Status field on the Page Layout of Opportunity. I tried going to Quote/Search Layout and also Quote/Search Filter. But, nevertheless, I could click on each quote and see the results of the status changed to Denied when I status of one of the Quotes was chosen as Accepted. Thanks!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.