You need to sign in to do that
Don't have an account?
![brd brd](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
validation rule need for opportunity fields
Hi,
I need to write a validation rule for Opportunity Object. I have two standard field Stage and Probability.
Scenario:
When Stage= Plan is selected from the StageName picklist field the probability by default is 1% but user can edit this.
Now i have to write a validation rule for this in which i can restrict user so that they can enter only three values for stage=Plan manually. The values are 1%,0% and 2%. If user enters probabilty apart from this for the Stage=Plan then error has to be thrown.
I am doing like this but this formula is not working:
IF(AND( ISPICKVAL(StageName,'Plan '), OR((Probability =0.01),(Probability=0),(Probability=0.02))),true,false)
Need help in this.
Thanks
Hi,
Try this
IF(AND( ISPICKVAL(StageName,'Plan'), NOT(OR((Probability =0.01),(Probability=0),(Probability=0.02)))),true,false)
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks
All Answers
Try this
AND(
ISPICKVAL(StageName ,'Plan'),
AND(
Probability <> 0, Probability <> 2,Probability <> 1
)
)
Hit kudos and mark this as answer if it helps you,
thanks,
Hi there,
there seems to be a space in your picklist 'Plan ' besides that > you can remove the IF clause as the AND will return true or false.
Hi,
Try this
IF(AND( ISPICKVAL(StageName,'Plan'), NOT(OR((Probability =0.01),(Probability=0),(Probability=0.02)))),true,false)
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks
you need not write IF here,
this too does the same thing,
AND(
ISPICKVAL(StageName ,'Plan'),
AND(
Probability <> 0, Probability <> 0.02,Probability <> 0.01
)
)