The new lightning Process builder is a combination of Flow and Workflow rule. In other word we can say that it’s a next level of Workflow rule, that allows us to automate the business process by creating Processes with point-and-click. Process builder is only available in Enterprise, Unlimited, Performance and Developer editions. The process builder supports several different types of actions, one of them is Update Records. After Summer’15 release, when you update records in your process, you can now filter the records using conditions. Let’s start with a business use case
Business Use case :- Steven Greene is working as System administrator in Universal Container. He has received a requirement from the management, whenever a quote is accepted by the customer, then auto update related quotes from the same Opportunity to Denied.
Solution of above business requirement
There are a few possible solutions for the above business scenario, but I’ll use Process Builder to solve the above business requirement. Follow the below instructions to create a Process for the above business requirement
1. Click on Name | Setup | App Setup | Create | Workflows & Approvals | Process Builder
2. To create a new process from scratch, click on the New Button available on Process management page, A popup will appear where you have to enter the Name (Use Update related quotes to Denied as name), API Name and Description as shown in the below screenshot
3. Click on Object node to add object and then select Quote object. For the entry criteria, Select when a record is created or edited, as shown in the below screenshot, once you are done click on the Save button
4. The next task is to add Process Criteria, To do this click on Add Criteria, enter Name, Type of action and set filter conditions (In this case set [Quote].Status Equals Accepted) and click on the Save button as shown in the following screenshot
5. The next step is to add an Immediate action to Process. Click on Add Action (Under Immediate actions), Select the type of action to create (In our case Update Records). Use Field Picker to select the object as shown in the following screenshot to select the object
Then select Updated records meet all conditions option for field Criteria for Updating Records, as shown in the following screenshot
The next step is to set the conditions that you want to use to filter out the records and at the end set new field values for the records you update, as shown in the following screenshot
6. Once you are done, click on the Save button, it will redirect you to Process canvas. Finally the Process will look like the following screenshot
Don’t forget to active the Process by clicking on the Activate button.