This is actually a bug in the Tooling API itself rather than the wrapper, but logging here to discuss. I did some research over on this StackExchange answer here.
To test this i updated the ToolingAPIDemo class and output the JSON returned, also tested (as per StackExchange answer) in Workbench, the info is just not present, yet you get the corresponding number of pick list items.... :-1:
public static void updatePicklist() {
ToolingAPI toolingAPI = new ToolingAPI();
// Query CustomObject object by DeveloperName (note no __c suffix required)
List<ToolingAPI.CustomObject> customObjects = (List<ToolingAPI.CustomObject>)
toolingAPI.query('Select Id, DeveloperName, NamespacePrefix From CustomObject Where DeveloperName = \'Test\'').records;
// Query CustomField object by Name (filtered by CustomObject Id)
Id customObjectId = customObjects[0].Id;
List<ToolingAPI.CustomField> customFields = (List<ToolingAPI.CustomField>)
toolingAPI.query('Select Id, DeveloperName, NamespacePrefix, TableEnumOrId, Metadata From CustomField Where TableEnumOrId = \'' + customObjectId + '\' And DeveloperName = \'YesNo\'').records;
// Dump Picklist entries
for(ToolingAPI.PicklistEntry picklistEntry : customFields[0].metadata.picklist.pickListValues) {
System.debug('Pick list label ' + picklistEntry.label);
}
// Next step would be to update pick list values and call the update Tooling API end point
// ...
}
This is actually a bug in the Tooling API itself rather than the wrapper, but logging here to discuss. I did some research over on this StackExchange answer here.
To test this i updated the ToolingAPIDemo class and output the JSON returned, also tested (as per StackExchange answer) in Workbench, the info is just not present, yet you get the corresponding number of pick list items.... :-1: