You need to sign in to do that
Don't have an account?
Swetha A 5
I need to write a validation rule on opportunity. when a record type is "record type 1" and user has selected stage as "closed won", then he can't update the stage value to its previous value
I need to write a validation rule on opportunity. when a record type is "record type 1" and user has selected stage as "closed won", then he can't update the stage value to its previous value. Please kindly help me as it is an urgent requirement. Thanks in advance
OR(
AND(
ISPICKVAL(StageName, "Negotiation/Review"), ISPICKVAL(PRIORVALUE(StageName), "Closed Won")),
AND(
ISPICKVAL(StageName, "Proposal/Price Quote"), ISPICKVAL(PRIORVALUE(StageName), "Closed Won")),
AND(
ISPICKVAL(StageName, "Perception Analysis"), ISPICKVAL(PRIORVALUE(StageName), "Closed Won")),
AND(
ISPICKVAL(StageName, "Id. Decision Makers"), ISPICKVAL(PRIORVALUE(StageName), "Closed Won")),
AND(
ISPICKVAL(StageName, "Value Proposition"), ISPICKVAL(PRIORVALUE(StageName), "Closed Won")),
AND(
ISPICKVAL(StageName, "Needs Analysis"), ISPICKVAL(PRIORVALUE(StageName), "Closed Won")),
AND(
ISPICKVAL(StageName, "Qualification"), ISPICKVAL(PRIORVALUE(StageName), "Closed Won")),
AND(
ISPICKVAL(StageName, "Prospecting"), ISPICKVAL(PRIORVALUE(StageName), "Closed Won"))
)
All Answers
Try this formula in Opportunity Validation rule
AND(RecordTypeId ='01XXXXXXXXXXXX',ISPICKVAL(PRIORVALUE(StageName),'Closed Won'), ISCHANGED(StageName))
Hope this helps!
Thanks
P.S : If this solves your problem, Please mark this as solution by selecting it as best answer.
It is working. But the issue is that it is working for previous and next value.My requirement is it cant go backward. but it can go forward. For example: A user selects "closed won" at the time of opportunity record creation. After he edits the stage to "Negotiation/Review", validation should trigger. And if he selects the stage as "closed lost", validation should not trigger and record need to be saved. if it possible then please share the answer. Thank you..
OR(
AND(
ISPICKVAL(StageName, "Negotiation/Review"), ISPICKVAL(PRIORVALUE(StageName), "Closed Won")),
AND(
ISPICKVAL(StageName, "Proposal/Price Quote"), ISPICKVAL(PRIORVALUE(StageName), "Closed Won")),
AND(
ISPICKVAL(StageName, "Perception Analysis"), ISPICKVAL(PRIORVALUE(StageName), "Closed Won")),
AND(
ISPICKVAL(StageName, "Id. Decision Makers"), ISPICKVAL(PRIORVALUE(StageName), "Closed Won")),
AND(
ISPICKVAL(StageName, "Value Proposition"), ISPICKVAL(PRIORVALUE(StageName), "Closed Won")),
AND(
ISPICKVAL(StageName, "Needs Analysis"), ISPICKVAL(PRIORVALUE(StageName), "Closed Won")),
AND(
ISPICKVAL(StageName, "Qualification"), ISPICKVAL(PRIORVALUE(StageName), "Closed Won")),
AND(
ISPICKVAL(StageName, "Prospecting"), ISPICKVAL(PRIORVALUE(StageName), "Closed Won"))
)