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
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:form>
        <apex:inputField styleClass="slds-input" id="test1"   value="{!Account.Country__c}" /> <br/>
        <apex:inputField id="dependentfieldid"  value="{!Account.State__c}" />
    </apex:form>
</apex:page>


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.