Skip to main content

If you'reyour global value set is being used as a value set for a picklist, you can retrieve it by getting the picklist values for that field.

To do that you use the following:

Schema.DescribeFieldResult fieldResult = ObjectAPIName.FieldAPIName.getDescribe();
List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();

If you're global value set is being used as a value set for a picklist, you can retrieve it by getting the picklist values for that field.

To do that you use the following:

Schema.DescribeFieldResult fieldResult = ObjectAPIName.FieldAPIName.getDescribe();
List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();

If your global value set is being used for a picklist, you can retrieve it by getting the picklist values for that field.

To do that you use the following:

Schema.DescribeFieldResult fieldResult = ObjectAPIName.FieldAPIName.getDescribe();
List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();
Source Link
Callum MacErlich
  • 2.5k
  • 1
  • 7
  • 17

If you're global value set is being used as a value set for a picklist, you can retrieve it by getting the picklist values for that field.

To do that you use the following:

Schema.DescribeFieldResult fieldResult = ObjectAPIName.FieldAPIName.getDescribe();
List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();