I am trying to implement a retrieval of global picklist values in apex using metadata API but I am not able to understand how to do that. Anyone having any idea. I was looking at https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_globalpicklist.htm but was not able to understand. I am trying to send the UI(lightning component) the picklist values of country and state which are global picklists.
When retrieving Standard Picklists you need to use
StandardValueSet in your xml package just like this:
This is a list of standard picklists names: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/standardvalueset_names.htm If you are trying to retrieve custom picklist values just retrieve them as custom fields like this:
If you want to retrieve global picklists you need to use GlobalValue Set. If there is a field in your object that is referencing a global picklist with values then you need to retrieve the field along with the global picklist.
I hope this helps! If you still have issues, please post a sample of your package.xml file.