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
erika002erika002 

probability ranges for probability field on opportunity

Hey,

 

I would like my salespeople only to fill in correct probabilities for opportunities.

 

When stage is "Identified" it should be between 1%-49%

Qualified: between 40% & 69%

Proposed: between 70% & 99%.

 

So when they fill in 25% and select "qualified" there is an error message or the other way around.

 

Can this be done by validation rules or something?

 

Thx!

Best Answer chosen by Admin (Salesforce Developers) 
Steve :-/Steve :-/

I dunno why I'm doing this for you, I'm still waiting for the frist beer you owe me ;-p

 

OR( 
AND(ISPICKVAL(StageName,"Identified" ), Probability < 0.01), 
AND(ISPICKVAL(StageName,"Identified" ), Probability > 0.49), 
AND(ISPICKVAL(StageName,"Qualified" ), Probability < 0.40), 
AND(ISPICKVAL(StageName,"Qualified" ), Probability > 0.69), 
AND(ISPICKVAL(StageName,"Proposed" ), Probability < 0.70),
AND(ISPICKVAL(StageName,"Proposed" ), Probability > 0.99)
)

 

 

All Answers

Steve :-/Steve :-/

I dunno why I'm doing this for you, I'm still waiting for the frist beer you owe me ;-p

 

OR( 
AND(ISPICKVAL(StageName,"Identified" ), Probability < 0.01), 
AND(ISPICKVAL(StageName,"Identified" ), Probability > 0.49), 
AND(ISPICKVAL(StageName,"Qualified" ), Probability < 0.40), 
AND(ISPICKVAL(StageName,"Qualified" ), Probability > 0.69), 
AND(ISPICKVAL(StageName,"Proposed" ), Probability < 0.70),
AND(ISPICKVAL(StageName,"Proposed" ), Probability > 0.99)
)

 

 

This was selected as the best answer
erika002erika002

 

This is what I finally did:

 

3 separate validation rules (i needed also 3 different error messages)

 

ISPICKVAL( StageName, "Identified")&& Probability > 0.39

ISPICKVAL(StageName, "Qualified") && (Probability > 0.69 || Probability < 0.40)

ISPICKVAL(StageName, "Proposed") && (Probability > 0.99 || Probability < 0.70)

 

Thanks for your answer :-). Didn't you get my beer?

Steve :-/Steve :-/

I'm still waiting for the 3-D one