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
Anil Kumar 1257Anil Kumar 1257 

Users are only allowed to edit car records on weekdays how can do that

Users are only allowed to edit car records on weekdays
mukesh guptamukesh gupta
Hi Anil,

For your solution you need to create formula field like below :- 
 
CASE(WEEKDAY(DATE(YEAR(TODAY()), 1, 1)),
1, DATE(YEAR(TODAY()), 1, 1) + 1,
2, DATE(YEAR(TODAY()), 1, 1),
3, DATE(YEAR(TODAY()), 1, 1) - 1,
4, DATE(YEAR(TODAY()), 1, 1) - 2,
5, DATE(YEAR(TODAY()), 1, 1) - 3,
6, DATE(YEAR(TODAY()), 1, 1) - 4,
DATE(YEAR(TODAY()), 1, 1) - 5)
and this formula you can use in your page like in AURA, VF pgae or LWC

if you need any assistanse, Please let me know!!

Kindly mark my solution as the best answer if it helps you.

Thanks
Mukesh