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
drs-medrs-me 

test dependent picklist

Hi guys,
I have an Apex class, which does logical operation on dependent picklist.
Since I cannot find any default dependent picklist fields, how can I create a test class, which can run on any org ?
THanks.
Best Answer chosen by drs-me
drs-medrs-me
I have solved it by creating an object and on that object created a dependent pick list.
This object is solely used for this testing purpose.

All Answers

drs-medrs-me
Maybe my question was not clear enough:
i hava an apex class where I need an apex test classto be deployed to any org as a managed package 
my apex function works with dependent picklist. 
So to test it, I need any object with a dependent picklist. 
Since I cannot find a default sepensent picklist (without to create it manually), how can I test my code ?
or are there any default dependent picklist in salesforce I can use in my test class?
drs-medrs-me
I have solved it by creating an object and on that object created a dependent pick list.
This object is solely used for this testing purpose.
This was selected as the best answer