I want to check if state
exists or not with a country
in State and Country Picklist feature supported by Salesforce. I want to do this in Apex. How can I do this?
-
1As I presume its the dependencies that you are interested in, I think getting hold of that information is pretty awkward - see salesforce.stackexchange.com/questions/4462/….– Keith CNov 13, 2013 at 14:21
1 Answer
To my understanding, when the State and Country Picklist feature is activated, it overrides the State
and Country
fields you currently have in your Standard Objects. Therefore, the State and Country fields should still be picklists but with the available values updated.
Hence, I believe you should be able to find State
and Country
picklist values like you would any other picklist:
See my answer here for code samples on how to find picklist values in APEX: VisualForce: Picklist multiple checkboxes