Example: Update the Hire Date field with Employment Start Date
Setting up a Flow to update the Hire Date field in the Team Member record with the Start Date field from the Employment Record is an example of a related-record field update. The following diagram shows the process flow:
-
Go to Setup > Platform Tools > Process Automation > Flows and select New Flow.
-
Select Record-Triggered Flow and select Create.
-
On the Configure Start screen, select the object and trigger, and set the entry conditions as follows:
-
Object: select the field, search for Employment and then select the Employment object from the search results.
-
Trigger the Flow When: select A record is created or updated
-
Condition Requirements: select All Conditions Are Met (AND) and then enter the details for the condition:
-
Field: search for and select Start Date (fHCM2__Start_Date__c)
-
Operator: select Is Changed
-
Value: select $GlobalConstant.True
-
-
When to run the Flow for Updated Records: defaults to Every time a record is updated and meets the condition requirements because you are using the Is Changed operator
-
Optimize the Flow For: select Actions and Related Records
-
-
Select Done.
Sage People displays the Flow Builder canvas.
-
On the Flow Builder canvas, select + Add Element between the Start and End elements.
-
Select Update records.
-
On the New Update Records screen, complete the Label and optionally, the Description. The API Name field is automatically completed based on the Label.
-
Complete the other fields as follows:
-
How to Find Records to Update and Set their Values: Select Specify conditions to identify records, and set fields individually
-
In the Update Records of This Object Type section, select Object, search for and select the Team Member object.
-
In the Filter Team Member Records section, for Condition Requirements to Update Records select All Conditions Are Met (AND) and enter details for the condition as follows:
-
Field: select Id
-
Operator: select Equals
-
Value: select {!$Record.fHCM2__Team_Member__c}
This step links the Employment Record to the related Team Member.
-
-
In the Set Field Values for the Team Member Records section, complete the fields as follows:
-
Field: select Hire Date (fHCM2__Hire_Date__c)
-
Value: select {!$Record.fHCM2__Start_Date__c}
-
-
-
Select Done.
-
On the Flow Builder canvas, select Save, enter the Flow Label and optionally the Description. Flow API Name is automatically completed based on the Flow Label. Then select Save.
-
After saving, select Activate to make the Flow active.