+ Start a Discussion
Sarah A McCaigSarah A McCaig 

VisualForce page issue - Dependant picklist showing as read only


I have a custom object with 2 global picklists on it. These are then marked as dependant.
When I edit the record on a standard page the dependant picklists work correctly.
When I edit the record from a visualforce page the dependant picklist is read only and looks empty.

I have checked the permissions, its via the admin profile and every thing is definately turned on and editable. 
I can't see why it wouldn't work. If I remove the dependancy the both fields are editable again on the visualforce page.

Deepak GulianDeepak Gulian
Share your VF code please and Name of both fields
Sarah, are you using <apex:inputField> to display your dependent picklist fields? Can you post your code or a screenshot?

Sarah, try something to use with your apex:output field. 


Account acc { get; set; } public MyClass(){ acc = [Select MyPicklist__c From Account Where Id = 'XXXXX']; }
<apex:pageBlock mode="inlineEdit"> <apex:pageBlockSection> <apex:outputField value="{!acc.MyPicklist__c}"> <apex:inlineEditSupport event="onclick"/> </apex:outputField> </apex:pageBlockSection> </apex:pageBlock>



Sarah A McCaigSarah A McCaig

My code is:
<apex:page   showHeader="false" sidebar="false" showChat="false" standardController="Views_Renewal_Form__c" >
 <apex:form id="updateRenewalForm" forceSSL="true" style="margin-left: auto; margin-right: auto; width: 90%">
 <apex:pageBlock  mode="maindetail" >
     <apex:pageBlockButtons >
             <apex:commandButton value="Save" action="{!save}"/>
 			<apex:inputfield value="{!Views_Renewal_Form__c.Agreement_length1__c}"/>
			<apex:inputfield value="{!Views_Renewal_Form__c.Payment_schedule_preference1__c}"/>

And screenshot: 
screen shot

Deepak GulianDeepak Gulian

I'm also having the same issue, if you make global picklist dependent on picklist field of object it will not work on standard page also!

Post your issue over here https://success.salesforce.com/_ui/core/chatter/groups/GroupProfilePage?g=0F9300000009PDtCAM