Record types

Tips for deploying Salesforce record types using Gearset

Jason Mann avatar
Written by Jason Mann
Updated over a week ago

Deploying Record Types to Salesforce has always been a bit tricky, especially since the introduction of Global Value Sets in Winter ‘17.

Gearset’s dependency and problem analysis engine helps deal with some of the challenges of deploying Record Types and picklist fields.

Global Value Set dependencies

Picklist fields that use Global Value Sets generate a dependency on the Global Value Set, so Gearset will automatically make sure that the Global Value Set is available and up to date on the target as part of the deployment.

Deploying record types

In the comparison grid, select the record type needed.

Gearset's record type view will split up the record type, allowing for precision deployments of record types.

Every picklist field must be deployed

To deploy a Record Type, you must also deploy all fields that the Record Type references or Salesforce will fail the deployment with an error.

The addition of Global Value Sets makes this requirement even more confusing still! Salesforce produces an error if the Record Type names a Global Value Set, but it isn’t used in any of the fields in the object. The error is very confusing, and it will imply that the Value Set isn’t on the target when really it is trying to say that the Value Set, whilst present, isn’t used by any of the fields. Gearset knows about this and will make sure that all the necessary fields are included in the deployment.

Record types can contain out-of-date picklist definitions

Finally, we will check that all the definitions in the Record Type are actually associated with object fields and remove any that are not. Sometimes edits in Salesforce can leave definitions behind that no longer reference any fields, and the dependencies can also easily be overlooked when working on the metadata in a source-controlled repository. Previously these issues had to be resolved by modifying the definition on the source, but now, Gearset’s problem analysis will suggest removing the superfluous definitions so that your deployment will succeed.

The Salesforce platform is a powerful one, and representing that power in metadata can make for complicated XML files. Gearset’s unique analysis engine understands the metadata and how to transform it to enable successful deployments, so you can get on with your work!

Did this answer your question?