You need to sign in to do that
Don't have an account?
Shanmugapriya Murugandurai 6
The dependent picklist 'Dependentfield' requires its controlling field 'Controllingfield' to be present on the page.
In a custom object I have a dependent picklist, and I have provided field level access(read/write) through permission sets. If i provide Read&write permission for Dependent field and only Read permission permission for Controlling field, I got the below error while loading the page.
ERROR: "The dependent picklist 'Dependentfield' requires its controlling field 'Controllingfield' to be present on the page."
Can anyone tell is this is the standard behaviour of salesforce or i need not do anything to make it work fine?
Thanks in advance.
ERROR: "The dependent picklist 'Dependentfield' requires its controlling field 'Controllingfield' to be present on the page."
Can anyone tell is this is the standard behaviour of salesforce or i need not do anything to make it work fine?
Thanks in advance.
Yes this is a standard behaviour.Please add the Controlling field as like Depending Field. So that error will be resolved.
Thanks
Srinivas
Thanks for the reply, but I need that controlling field should not be editable, in my scenario
Are you getting this error on Standard page of Salesforce or Visualforce page?
Regards,
Sameer Tyagi.
http://mirketa.com/
I am getting this error on Visualforcepage(Custom page)
Thanks,
Priya
Please try this.
First you need to initialize your Controlling field value in your controller in Constructor.
public objname obj = new objname();
public String str {get ; set}
Public classconstructor {
obj = new objname();
obj.Controllingfield = 'Any Value';
str = obj.Controllingfield
}
<apex:inputField value="{!obj.Controllingfield}" style="display:none; />
<!--You can show Str value here with label if you want -->
<apex:inputField value="{!obj.Dependentfield}" />
Sameer Tyagi
Thanks,
Priya
Have you tried above sample code above?
If that does not work, Can you please share your sample code So that I can try more to fix it?
Sameer
I found that there is a salesforce limitation, the limitation is
"If the user viewing the page has read-only access to the controlling field, a dependent picklist might not behave as expected. In this case, the dependent picklist shows all possible values for the picklist, instead of being filtered on the read-only value. This is a known limitation in Visualforce"
Referred in "https://www.salesforce.com/us/developer/docs/pages/Content/pages_quick_start_dependent_picklists.htm".
Now my problem got solved. The solution is we need to provide read&write permission for a controlling field, if the dependent field is present on the page with read&write permission.
Thanks everyone.
Without adding dependent also its working fine in salesforce classic view its not working in lightning view can u pls help
i have tried your still not working please help me out as i do not want to show dependent picklist
I have same issue like you, could you please advise me how to give read&write permission for a controlling field?