+ Start a Discussion
shobana shobana 1shobana shobana 1 

validation rule to restrict the user to update the opportunity

My scenario is ,If the user edit the opportunity after three business days from the closed date it should throw the error message.
(CASE(
MOD( CloseDate - DATE(1900, 1, 7), 7),
0, CloseDate+3, 
1, CloseDate+3, 
2, CloseDate+3, 
3, CloseDate+5, 
4, CloseDate+5, 
5,CloseDate+5, 
6,CloseDate+4, 

CloseDate))<=  TODAY()

It throwing an error but if i edit the Closed_Date at that time also its throwing an error. Can anyone help me out to solve this issue.

Thanks In Advance

Sanjay Mulagada 11Sanjay Mulagada 11
Try this -
AND(
NOT(ISCHANGED(CloseDate)),
(CASE( MOD( CloseDate - DATE(1900, 1, 7), 7), 0, CloseDate+3, 1, CloseDate+3, 2, CloseDate+3, 3, CloseDate+5, 4, CloseDate+5, 5,CloseDate+5, 6,CloseDate+4, CloseDate))<= TODAY()
)