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
Naveen 2SFDCNaveen 2SFDC 

Help with locking up one months old record

 I have a requirement where Sales rep should not be able to edit Amount field of one month's old records. How to achieve this? also if he wants to change the amount field, that different amount should be added to his next month's revenue goal amount field.
arpit vijayvergiyaarpit vijayvergiya
Hi Naveen,

You can prevent user from updating amount if record by this following validation rule.
 
AND((TODAY() - DATEVALUE(CreatedDate)) > 30, isChanged(AmountField))

Thanks,
Arpit vijayvergiya