function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nicole PonceNicole Ponce 

Workflow Rule - default date to first of month

Hi,

I'm wanting to implement a workflow rule that will auto-update a date field to the 1st of the month.

E.g. if a user enters 24/07/2017 in field A of date type, this would auto-update to 01/07/2017; if user enters 04/02/2016 this would auto-update to 01/02/2016 etc.

Appreciate any guidance on how I might achieve this, thank you.
Best Answer chosen by Nicole Ponce
RKSalesforceRKSalesforce
Hi Nicole,

Please create workflow rule like below. I am using Opportunity Object and its Close Date field.
User-added image

User-added image
Please mark as best answer if helped.

Regards,
Ramakant

All Answers

Jainam ContractorJainam Contractor
Hi Nicole,

You can create a Process Builder/ Workflow rule as per your convenience/ requirement.

I would suggest creating a Process Builder as it can accomodate multiple processes within 1 Process Builder.

1. Create a Process Builder on the Object you want to update the field to.
2. Select When a record is Created and Edited
3. Select the Entry Criteria to check the Date of Field A, if it is Not Equal to 1. In the Advanced Section, please check the Checkbox to update/ execute the process only when that specific field value is changed.
4. In the Immediate Action, select the Record --> Field you want to Update and use the Formula as shown in the below Snap.

Below are the Snaps for the above mentioned process:

User-added image

User-added image

User-added image

Please let me know if you need more assistance. Please mark this as the solution if it solved your purpose to help community grow.

Thanks & Regards,
Jainam Contractor,
Salesforce Consultant,
Varasi LLC
www.varasi.com
RKSalesforceRKSalesforce
Hi Nicole,

Please create workflow rule like below. I am using Opportunity Object and its Close Date field.
User-added image

User-added image
Please mark as best answer if helped.

Regards,
Ramakant
This was selected as the best answer
Nicole PonceNicole Ponce
Thank you so much Ramakant - this solution works beautifully! :)