"Spring 24 (SP24) Certification Cycle Start date is 13th April 2024"
join our Telegram Chanel Latest Updates https://t.me/salesforcekeeda

Monday, February 18, 2019

Process Builder – Part 2 (Time-dependent actions)

Business Use case
Steve Cartwright is working as a System administrator at Universal Containers (UC). He has received a requirement to auto update Asset Description (with the sentence “Update the Serial Number “) field after 1 day of its creation if Asset’s Serial Number is blank.

Solution for the above business requirement
To solve the above business requirement, we will use Process BuilderProcess builder allowed us to update the record from same object or records from child object or records from the parent object (In both the cases master-detail or look-up relationship). Whereas Workflow rule allows us to only update the record from the same object or parent object (In the case of master-detail relationship only). At the end of this article, I will show you how to track time-dependent actions and the hidden concept behind it. Follow the below instructions to create a Process for the above business requirement




1. Click on Name | Setup | App Setup | Create | Workflows & Approvals | Process Builder2. To create a new process from scratch, click on the New Button available on Process Management page, A popup will open where you have to enter Name (Enter Update Asset description as name), API Name and Description as shown in the below screenshot:

Define Process Properties


3. Once you click on the Save button, it will redirect you to Process canvas. Click on Object node to add object and set the evaluation criteria, Please refer to the following screenshot for more details

Evaluation Criteria


4. The next step is to define Process criteria. For this click on Add Criteria node, Enter Criteria NameSet filter conditions (Similar to Rule Criteria in WFR), as shown in the following screenshot
Process Criteria

5. The next task is to set the time for scheduled action. For this click on Set Schedule available under Scheduled actions. Set time for scheduled actions as shown in the following screenshot
Time for Scheduled actions
TIME FOR SCHEDULED ACTIONS
6. Now we have to add a Time-based action into the Process to update the Asset record. For this use Update Records action, Use Field Picker to select the field Description and Text Entry field to enter a comment or sentence. Click on the Asset object as shown in the following screenshot to select the object
Select Object
SELECT OBJECT
Then select the Description field and enter the comment, Please refer to the following screenshot for more details
Add action - Update Records
ADD ACTION – UPDATE RECORDS
7. Finally the Process will look like the following screenshot, clicking on the Activate button.
Update Records
Now onwards if you create an Asset record without Serial Number, It will schedule a time-based action to update the records as per your Process design.
It’s time to test this Process
To test this flow, create an Asset record as shown in the following screenshot
Create a new Asset record
Process Builder – Part 1 (Auto Create a record)