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
swapna ka 1swapna ka 1 

workflow rule on closed date change

Hi 
can you please help me on below wf rule condition
req: oppty is created with stage closed won/lost , user want to update that oppty ,change date(closed date) <= initial closed date +7 we need to keep same initial closed date after saving the record
for that i have created wf rule like below 

AND( 
OR( ISPICKVAL( StageName, "closed won"),ISPICKVAL(stagename, "closed Lost")),CloseDate <= 7-PRIORVALUE(CloseDate))

Error: Function PRIORVALUE may not be used in this type of formula

Thanks,
Swap.
Best Answer chosen by swapna ka 1
Shashi PatowaryShashi Patowary
Hi Swapna,

Got your issue.This formula works only if you select Evaluation Criteria as 'created, and every time it’s edited'. Other two options are not available.Please try to change this criteria and paste the formula that I provided (feel free to modify it).

User-added image

Please let me know if it is helpful.

Regards,
Shashi

All Answers

Shashi PatowaryShashi Patowary
Hi Swapna,

Can you please use this way -

AND(
OR( ISPICKVAL( StageName, "closed won"),ISPICKVAL(stagename, "closed Lost")),CloseDate <= PRIORVALUE(CloseDate)+7)

Please let me know if this is helpful.

Regards,
Shashi
swapna ka 1swapna ka 1
Hi Shashi,

thanks for your replay 
getting the below error

Error: Function PRIORVALUE may not be used in this type of formula
 
Shashi PatowaryShashi Patowary
Hi Swapna,

Got your issue.This formula works only if you select Evaluation Criteria as 'created, and every time it’s edited'. Other two options are not available.Please try to change this criteria and paste the formula that I provided (feel free to modify it).

User-added image

Please let me know if it is helpful.

Regards,
Shashi
This was selected as the best answer