Is there a way to find out using SOQL the association of global value set picklist with custom field?
I have custom field (test__c
) dataType as a picklist and I select Use global picklist value set
I need to know either Apex/SOQL/tooling api what global picklsit name I have selected
Here is the attached screen shot.
Best Answer
You should be able to get the data by querying (Tooling API):
The
valueSet
attribute of theMetadata
field will contain the name of the global picklist used, if any.Example (40.0):
Note that this will be the "developer" name of the valueSet. So, for example, above, my value set is called "A".