In Salesforce automation, flows are widely used to automate data processes like creating, updating, and deleting records.
In date fields, we have a standard last activity date field, but this date field gets updated even with small changes in the record, irrespective of the fields. For example, we have a custom date field, Customer review, and we want to track when we last updated this field.
In this Salesforce tutorial, we will learn to auto-update custom date field using Salesforce Flow. In this example, we will update the Last Review Date field with the help of Salesforce Record Trigger Flow.
Auto-Update Custom Date field using Flow in Salesforce
To Auto-Update the Custom Date field using Flow in Salesforce, you must have a custom date field in that specific object. To create the custom field, you can navigate to the Object Manager -> Object (Contact) -> Fields and relationships -> New field -> select option Date field.
After creating the field follow the below steps to create a record trigger flow to Auto-Update the Custom Date field.
1. Navigate to Salesforce’s Setup page and go to the Quick Find box. Here, search then select Flows under the heading Process automation.
2. In the Flows Setup page, click on the button New Flow.
3. Select the option Record Trigger Flow and click Create.

4. In the Trigger configuration, select the Object as Task, and then under the heading Trigger flow, select the option when a record is created or updated.

5. In the section Condtion requirements, according to the below table.
| Field | Operator | Value |
| Subject | Contains | Client Review (Custom Date) |
| Status | Equals | Completed |
| ActivityDate | IsNull | False |
After this, under the heading When to Run the Flow for Updated Records, select the option Only when a record is updated to meet the condition requirements.

6. Now add a Decision element to the flow and enter the Label and API Name for the decision element.
In the section, Outcome details, enter the Label and the Outcome API Name.
Then, in the Conditions Requirements, set the Resource as Record > Name ID (Who id), Operator as Start with, and value as 003 ( Contacts records ID starts from 003).

7. Add an Update record element to the Flow and enter the below fields.
- Enter the Label and API Name for the Updated record element.
- Activate the radio button ‘Update records related to the task record that triggered the flow.’
- In the Object field, select the Contact object.

8. In the Condition Requirements to Update the Fields, select the option All Conditions Are Met. After this, select the Field as Id, Operator as Equals, and Value as Record > Name ID (here, for the Name ID, select Who ID).
In the section, Set Field Values for Contact Records, select the Fields as Last Client Review (custom date field) and Value as Record > Due Date Only.

9. In the Default Outcome of the Decision element, add an End component.

10. Now save the flow with the relevant Flow Label, and the Flow API Name will be auto-filled according to the entered label. At last, click the Save button.

The trigger flow is created, and according to the applied condition, any task created related to Client review will update the custom date field Last Client Review in the Contact record.
Debug and test the Flow
We have created the flow to auto-update the custom date field until now. In the below steps, we will debug and test the flow.
1. After saving the Flow, click on the Debug button.

2. Select the option Updated for the condition to run the flow. In the Debug options, skip start condition requirements, select a Task, and click Run.

3. Here, we can see that the flow ran successfully without any errors.

4. Now, activate the flow so that we can use it.

5. Navigate to the Contact records and create a new task there, and according to trigger conditions, enter the Subject, Due Date, and Status of the task. You must include the word Client Review in the subject, and the status should be Completed.

6. As we create the task with the above details, the flow will trigger and it will update the date field with the current date.

This way, using the above steps, we can auto-update the Custom date fields in Salesforce using a flow.
Conclusion
In this Salesforce tutorial, we have learned to Auto-update the Custom Date field using the Flow, where we created a Record Trigger flow to update the field. In addition, we debugged the created flow and tested it in the Salesforce developer Console to ensure its functionality.
You may like to read:
- How to Use Decision Element in Salesforce Flow
- How to Update Picklist-Multiselect using Flow in Salesforce
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.