Salesforce 机会字段依赖关系

Salesforce 机会字段依赖关系,salesforce,Salesforce,在我下面的代码中,字段依赖项不起作用。 我在这里读到了应该有用的东西。如果我将字段添加到页面中,依赖项应该会自动工作,但它不会 <apex:pageblock title="Verkaufschancen Übersicht" id="pbOpp" mode="inlineEdit" rendered="{!AccDList2.size>0}"> <apex:pageBlockButtons location="top"> <apex:commandB

在我下面的代码中,字段依赖项不起作用。 我在这里读到了应该有用的东西。如果我将字段添加到页面中,依赖项应该会自动工作,但它不会

<apex:pageblock title="Verkaufschancen Übersicht" id="pbOpp" mode="inlineEdit" rendered="{!AccDList2.size>0}">
<apex:pageBlockButtons location="top">
    <apex:commandButton action="{!SaveNewOpp}" value="Save" id="saveButton1" rerender="pbOpp, pbAccPlan" 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}" required="true"/>    
    <apex:inputField value="{!oppString.Name}" required="true"/>
    <apex:inputField value="{!oppString.StageName}" required="true"/>        
    <apex:inputField value="{!oppString.Amount}" required="true"/>
    <apex:inputField value="{!oppString.Probability}" required="true"/>
    <apex:inputField value="{!oppString.Bewertung_in__c}" required="true"/>
    <apex:inputField value="{!oppString.CloseDate}" required="true"/>
</apex:pageBlockSection>

在您的示例中,哪些是依赖字段

确切的问题是,当您更改控制字段时,依赖字段是否未更改,或者它们是否未正确保存

Public PageReference SaveNewOpp() {
Opportunity opp = new Opportunity();
opp.AccountId = SelectedAccountId;
opp.Name = oppString.Name;
opp.StageName = oppString.StageName;
opp.Amount = oppString.Amount;
opp.Probability = oppString.Probability;
opp.CloseDate = oppString.CloseDate;
opp.RecordTypeId = oppString.RecordTypeId;
opp.Bewertung_in__c = oppString.Bewertung_in__c;
INSERT opp;
RETURN NULL;
}