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
n sri 8n sri 8 

Opportunity: Field Probability should be read only based on stage(both in edit and new pages)

Hi,
The user is currently able to edit the Probability Percentage for each stage of the Opportunity. The system should not allow the user to Save the changes made to the Probability field. I did write a validation rule, but it is not working. could you please post answer asap.


 
Rahul.MishraRahul.Mishra
Hi ,

Here is the formuala for Validation:
NOT(ISCHANGED(StageName))  && ISCHANGED(Probability)
It will not allow user to set the probability based on stage selected in picklist.

Mark solved if it does help you.

 
n sri 8n sri 8
thanks, it worked only for edit records, my requirement is, the user shouldn't change the probability at the time of new record creation.
Rahul.MishraRahul.Mishra
Hi,

Here you go, I have written the formula for you:
 
IF(ISPICKVAL( StageName , "Prospecting"), Probability != 0.1, 
IF(ISPICKVAL( StageName , "Qualification"),  Probability != 0.1, 
IF(ISPICKVAL( StageName , "Needs Analysis"),  Probability != 0.2,
IF(ISPICKVAL( StageName , "Value Proposition"),  Probability != 0.5,
IF(ISPICKVAL( StageName , "Id. Decision Makers"),  Probability != 0.6, 
IF(ISPICKVAL( StageName , "Perception Analysis"),  Probability != 0.7, 
IF(ISPICKVAL( StageName , "Proposal/Price Quote"),  Probability != 0.75, 
IF(ISPICKVAL( StageName , "Negotiation/Review"),  Probability != 0.9,
IF(ISPICKVAL( StageName , "Closed Won"),  Probability != 1,
IF(ISPICKVAL( StageName , "Closed Lost"),  Probability != 0,    
Probability = 0))))))))))


If you have any other opportunity stages then adjust the name and probality, options listed here from standard stage filed options.
Mark solved if it works fine.
n sri 8n sri 8
for existing values it is fine. But in future, I'll be adding extra values in stage name and probability. In that scenario, how many times I ['ll change the VR
Rahul.MishraRahul.Mishra
Then in that case Validation will not help you
n sri 8n sri 8
Thanks for the solution, but if any  solution is there other than this from anybody, please post it asap
Prasanth NalamPrasanth Nalam
i tried using your code Rahul.Mishra, but it didn't work for me and i can still edit the probability percentage. Any other alternate solution?