function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sarah A McCaigSarah A McCaig 

VisualForce page issue - Dependant picklist showing as read only

Hi,

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.

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

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

Apex:

Account acc { get; set; } public MyClass(){ acc = [Select MyPicklist__c From Account Where Id = 'XXXXX']; }
VF:
<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
Hi,

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:pageBlockButtons>
     
 			<apex:inputfield value="{!Views_Renewal_Form__c.Agreement_length1__c}"/>
			<apex:inputfield value="{!Views_Renewal_Form__c.Payment_schedule_preference1__c}"/>

 </apex:pageBlock>
 </apex:form>
</apex:page>
And screenshot: 
screen shot

Thanks
S
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