GlobalPicklist changes in Winter '17

by Patrick Connelly posted on November 11, 2016

Like many companies, we have a deployment process in place to handle changes in seasonal releases in Salesforce so that when a sandbox is ahead of production, we can still deploy to both without having to wait for production to be updated. Then, after both the release hits production, we go through a manual process of updating the API (primarily the ant-salesforce.jar) and the metadata to the most recent API version. Typically this just involves updating the jar and updating the API version in the request, pulling down the updated metadata and writing it to SCM. However, with the Winter ‘17 release we saw a problem trying to deploy our GlobalPicklist files after updating the API.

The Problem

After updating the API and trying to do a deployment we got the cryptic error

Error: Not available for deploy for this API version

The error goes away if the API version is rolled back to version 37.0

The Solution

Big shout out here to both Daniel Ballinger and Christian Carter for helping me find the solution. It turns out that in API 38.0, Salesforce has changed the names of picklists and how they are represented in the Metadata. (This folks is why you should always read the release notes) So in order to support API version 38.0 you will need to update your package.xml to include “GlobalValueSet” instead of “GlobalPicklistValue” We’ve also updated Solenopsis to handle this new metadata type.