You need to sign in to do that
Don't have an account?
Manish Verma 4
validation rule on opportunity object
hi all,
when opp stage is "closed won" then none of the fields should be editable. i have created a validation rule for this.
AND( ISPICKVAL( StageName ,"Closed won"),OR(ISCHANGED( Type ), ISCHANGED( Amount ), ISCHANGED( LeadSource ), ISCHANGED( CloseDate )) )
now when i change the stage field from qualification to closed won along with the changes in any other field. record should be saved but its not getting saved.
what mistake i am doing ? pls help.. do let me know is there anyother way to do this..Thanks
when opp stage is "closed won" then none of the fields should be editable. i have created a validation rule for this.
AND( ISPICKVAL( StageName ,"Closed won"),OR(ISCHANGED( Type ), ISCHANGED( Amount ), ISCHANGED( LeadSource ), ISCHANGED( CloseDate )) )
now when i change the stage field from qualification to closed won along with the changes in any other field. record should be saved but its not getting saved.
what mistake i am doing ? pls help.. do let me know is there anyother way to do this..Thanks
Edit your formula field like below.
=====================================
AND (
ISPICKVAL (StageName, "Closed won"), NOT (ISCHANGED(StageName)),
OR (ISCHANGED(Type), ISCHANGED (Amount), ISCHANGED (LeadSource), ISCHANGED (CloseDate))
)
=========================================
If there are any issues, Let me know.
Thanks,
Vignesh P
All Answers
Thanks.
Edit your formula field like below.
=====================================
AND (
ISPICKVAL (StageName, "Closed won"), NOT (ISCHANGED(StageName)),
OR (ISCHANGED(Type), ISCHANGED (Amount), ISCHANGED (LeadSource), ISCHANGED (CloseDate))
)
=========================================
If there are any issues, Let me know.
Thanks,
Vignesh P
May i know why you have used
NOT (ISCHANGED(StageName)),
Thanks and Regards
Anji
Pls try this..
AND( (ISPICKVAL(PRIORVALUE(StageName ), "Closed Won")),OR(ISCHANGED( Type ), ISCHANGED( StageName ), ISCHANGED( Amount ), ISCHANGED( LeadSource ), ISCHANGED( CloseDate )) )
Thanks
Consider you want to update the stageName field as 'Closed won' and some fields like type, amount etc 'in a single update'. If you have not used
'NOT (ISCHANGED(StageName))' means, the above action won't be happened. Manish clearly told this in his requirement.
Else, you can use 'ISPICKVAL(PRIORVALUE(StageName ), "Closed Won")'. Both are correct..
Try this, you can understand clearly.
Thanks,
Vignesh P