机会领域依赖

时间:2015-06-10 08:58:26

标签: salesforce

在我的代码下面,字段依赖不起作用。 我在这里阅读https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_quick_start_dependent_picklists.htm应该有用。如果我将字段添加到我的页面,依赖项应该自动工作,但它没有。

<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;
}

1 个答案:

答案 0 :(得分:0)

您的示例中的哪些依赖字段。

确切的问题是,当您更改控制字段或未正确保存时,相关字段是否未更改?