I have created a VF page for Opportunity, added this new vf page to Opportunity new button. When I am creating a new Opportunity, probability is showing in correct value. For example if I select the stage as "Negotiation" the probability should be "80%" but it's showing "10%". I am using PE, kindly any one tell how to resolve this and also tell any links for this. Thanks in advance, waiting for your reply.

VF Page:

<apex:inputfield value="{!Opportunity.StageName}" 

<apex:outputfield value="{!Opportunity.Probability}" />
  • Does the Probability remain incorrect after you save the Opportunity? – Jeremy Nottingham May 31 '13 at 7:18
  • @ Jeremy Yes, Probability showing wrong value when I edit the opportunity or creating a new Opportunity. – Lavanya Sanathkumar May 31 '13 at 7:40
  • Take a look at your workflow rules for opportunity. Its likely that new opportunities can't be entered with anything higher than 10% probability until you change your workflow rules. Also look at the validation rules that were on the original default VF page you replaced with your custom page. That might give you some other clues, such as required fields, default values, etc. – crmprogdev May 31 '13 at 8:16

There's no automatic way to do this as far as I can see. You can do it the old fashion way by creation a partial page update and querying/updating the probability value based on the stage.

1) Create an extension to your VF 2) Add actionSupport to the Stage field with action="{!changeStageName}" 3) Make sure the propability field is in the rendered/rerendered area 4) In your extension class, make sure to make the method changeStageName 5) Set the probability based on stage chosen by querying the Sales process (OpportunityStage).

This link has example codes so I am not going to paste them again.


Good Luck.




You define the probability associated with each Opportunity stage by going to Setup | Customize | Opportunities | Fields | Stage.
There you will see all the possible values for Stage, and what the corresponding Probability is. Click "edit" beside Negotiation and change it from 10% to 80%.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.