+ Start a Discussion
Sascha DeinertSascha Deinert 

Opportunity two fields dependency

Hi,

I add a new visualforce page to add new opportunities.
That works fine, but I want that the fields StageName and Probability are in dependency.
These fields are the standardfields from the object opportunity and it works if I use the standardopportunity case in salesforce.
If I change the StageName should change also the Probability.

Thanks,
Sascha
<apex:pageblock title="Verkaufschance Übersicht" id="pbOpp" mode="inlineEdit">
    <apex:pageBlockButtons location="top">
        <apex:commandButton action="{!SaveNewOpp}" value="Save" id="saveButton1" rerender="pbOpp" rendered="{!IF(newOpp=1,true,false)}"/>
        <apex:commandButton action="{!CancelNewOpp}" value="Cancel" id="cancelButton1" immediate="true" rendered="{!IF(newOpp=1,true,false)}"/>
    </apex:pageBlockButtons>              
    <apex:pageBlockSection rendered="{!IF(newOpp=1,true,false)}" columns="2">
        <apex:inputField value="{!oppString.RecordTypeId}"/>    
        <apex:inputField value="{!oppString.Name}"/>
        <apex:inputField value="{!oppString.StageName}"/>        
        <apex:inputField value="{!oppString.Amount}"/>
        <apex:inputField value="{!oppString.Probability}"/>
        <apex:inputField value="{!oppString.Bewertung_in__c}"/>
        <apex:inputField value="{!oppString.CloseDate}"/>
    </apex:pageBlockSection>
</apex:pageBlock>

 
Mohit Bansal6Mohit Bansal6
Sascha

I couldn't understand your issue.

Kindly brief your problem in detail.
Sascha DeinertSascha Deinert
@Mohit,

If I change the stage from an opportunity the probability will change also. This is the standardconfiguration in salesforce if I use the standardform to add a new or change a opportunity.

But I write a visualforce page to add and change the opportunity and this dependency doesn't work.#

Is that more clear

?stage