Record Type is one of the “dynamic” components where content may be varied depends on other components selected within the same deployment. This article highlights some of the points need attentions when deploying Record Types.
Deploy Record Types from Salesforce to Salesforce
Occasionally, error occurs when Record Type refer to standard picklist values not available in the target Org. In this case, go to Component Type -> Standard Value Set to add the missing values into the deployment.
Salesforce only retrieves the picklist value assignment for the record type only when both the record type and the picklist field are selected in the same deployment. When deploying Record Types without selecting any other picklist fields, then only standard picklists will be included in the Record Type metadata
No change when only the Record Type is selected in the deployment
Custom picklist values changes when the custom field “Region” is added to the deployment
Commit Record Type metadata from Salesforce to GIT
Similar to Salesforce to Salesforce, if you want to include custom picklist values in the Record Type, then the picklist fields will also need to be selected in the same deployment.
Merging picklist values: when committing a Record Type to GIT repository, Copado Essentials will merge new changes to existing Record Type in the repository:
If the picklist in the new commit does not exist in the current metadata file in GIT -> add that new picklist to the Record Type.
If the picklist in the new commit exist in the current Record Type in GIT -> the picklist values in GIT will be replaced with values in the new commit.
Deploy Record Type from GIT to Salesforce
When deploying from GIT to Salesforce, all the Record Type content in GIT will be deployed. Therefore, it is not required to select the custom picklist fields to include their values in the deployment.