+ Start a Discussion
akshay desai 9akshay desai 9 

Want to show only particular values of dependent picklist

I have 2 picklist Department & product which are dependent.
On a visualforce page i want to show the product picklist but want to show only those products in which department is 'Warehouse'
Foram Rana RForam Rana R
Hi Akshay,

​​​​​​​I hope you are doing well .....!!
Here I have create two picklist field one is country and another is state in Account.

Please use the below code and update code according to your requirement:
<apex:page standardController="Account">
        <apex:inputField styleClass="slds-input" id="test1"   value="{!Account.Country__c}" /> <br/>
        <apex:inputField id="dependentfieldid"  value="{!Account.State__c}" />

Hope this helps you.
If this helps kindly mark it as solved so that it may help others in the future.

Thanks & Regards,
Foram Rana
Foram Rana RForam Rana R
Here Country is Controlling field and STate is dependent Field.