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
Marcus AugustineMarcus Augustine 

Where to add date of most recently closed fiscal period for validation rules

We need to implement some data validation rules for accounts using the date of the most recently closed fiscal period in another system. We can't calculate when the period will be closed as it's a manual process. I would like to add the date to Salesforce so that it will be available for data validation rules but I'm not sure where this belongs. I've tried searching but haven't turned up anything that looks like what I need.
VinayVinay (Salesforce Developers) 
Hi Marcus,

Can you elloborate more on this and what is the pupose you are looking using validation rule?

Thanks,
Arun Kumar 1141Arun Kumar 1141

Hi Marcus

You can add date field in Saleforce. Just go to : 
* Setup > Objects Manager > Select the Object (e.g. Account) > Fields & Relationships > New.
* After this Select the data type of the field, In your case it is Date. Then click on Next
* Fill the necessary details and then Next
* Give Field level security and save the field

After that you can create records of account and give the value of this field.
Last you can create the validation rule according to your need.


Please mark this as best answer if this helps 
Thanks 

Marcus AugustineMarcus Augustine
Hi Vinay,
We are trying to prevent users from making a specific change to account records during parts of the fiscal period, but where the fiscal period is based on a manual process in another system. For example April is not closed until mid-May. So if April is closed in the other system on May 12th, we would not allow the change to be made to the record on May 11th, but on May 13th the change is allowed to be made.

If we add a date field to account records as in Arun Kumar's suggestion we need a way to automatically populate that date in new records, and update that date in every record each month when the period is closed in the other system. 
Dylan Hughes 12Dylan Hughes 12
As i know start by creating a custom date field in Salesforce to store the date of the most recently closed fiscal period. This field will be used for data validation or identify the integration method or mechanism that allows you to retrieve the date of the most recently closed fiscal period from the other system. This could involve using APIs, external services, or other means of data transfer.