You need to sign in to do that
Don't have an account?
Che SFDC
Probability not changing based on Stage selected.
Dear all:
I`m working on dynamic VF page which will show fields based on stages selected. Page works fine but the issue is with Probability field. While selecting Stage, Probability field does not show up value % associated at each level (like it generates for standard SF Opportunity page). Can one of you SF gurus please help in fixing this? Thanks!
<apex:page standardController="Opportunity" sidebar="false"> <apex:sectionHeader title="Edit Opportunity" subtitle="{!opportunity.name}"/> <apex:form > <apex:pageBlock title="Edit Opportunity" id="thePageBlock" mode="edit"> <apex:pageMessages /> <apex:pageBlockButtons > <apex:commandButton value="Save" action="{!save}"/> <apex:commandButton value="Cancel" action="{!cancel}"/> </apex:pageBlockButtons> <apex:actionRegion > <apex:pageBlockSection title="Basic Information" columns="1"> <apex:inputField value="{!opportunity.name}"/> <apex:pageBlockSectionItem > <apex:outputLabel value="Stage"/> <apex:outputPanel > <apex:inputField value="{!opportunity.stageName}"> <apex:actionSupport event="onchange" rerender="thePageBlock" status="status"/> </apex:inputField> <apex:actionStatus startText="applying value..." id="status"/> </apex:outputPanel> </apex:pageBlockSectionItem> <apex:inputField value="{!opportunity.amount}"/> <apex:inputField value="{!opportunity.closedate}"/> <apex:inputField value="{!opportunity.Probability}"/> </apex:pageBlockSection> </apex:actionRegion> <apex:pageBlockSection title="Closed Lost Information" columns="1" rendered="{!opportunity.stageName == 'Closed Lost'}"> <apex:inputField value="{!opportunity.Primary_Competitor__c}" required="true"/> <apex:inputField value="{!opportunity.Reason_Lost__c}"/> <apex:inputField value="{!opportunity.OrderNumber__c}"/> <apex:inputField value="{!opportunity.TrackingNumber__c}"/> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page>
You could follow the code in the sample below and implement it in your situation.
Regards,
Alok