0

I am getting this error now that I added Lead Status Reason to my custom lead convert page: "The dependent picklist 'Lead Status Reason' requires its controlling field 'Lead Status' to be present on the page." Lead Status has always been on the page, I just added Lead Status Reason here:

<!-- Converted Status -->
<apex:pageBlockSectionItem >
    <apex:outputLabel value="Converted Status" for="leadStatus" />
    <apex:outputPanel styleClass="requiredInput" layout="block">
        <div class="requiredBlock"></div>
        <apex:selectList id="LeadStatusList" size="1" 
            value="{!LeadToConvert.Status}" multiselect="false" required="true">
              <apex:selectOptions value="{!LeadStatusOption}"/>
        </apex:selectList> 
    </apex:outputPanel>
</apex:pageBlockSectionItem>
    <apex:pageBlockSectionItem >
        <apex:outputLabel value="Converted Status Reason" for="leadStatusReason" />
        <apex:outputPanel styleClass="Input" layout="block">
            <div class="Block"></div>
            <apex:inputField value="{!LeadToConvert.Lead_Status_Reason__c}" required="false">
            </apex:inputField>  
        </apex:outputPanel>               
    </apex:pageBlockSectionItem>

0

I solved this issue by making Lead Status an apex:inputField instead of apex:selectList in order for it to be recognized on the page with the dependent field.

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.