Explanation of the error
You may come across this validation error when deploying Custom Address field
to a target environment where the Custom Address fields
feature is disabled.
Example of Custom Address Field (XML)
<fields>
<fullName>Test_Address__c</fullName>
<label>Test Address</label>
<trackFeedHistory>false</trackFeedHistory>
<type>Address</type>
</fields>
Resolution
If the Custom Address fields feature is not enabled in the target org, Salesforce does not recognize Address
as a valid field type, and Gearset’s deployment fails with the “Invalid data type” error. To deploy Custom Address fields successfully, they need to be enabled in both source and target. To enable, please follow these steps:
Navigate to your target Salesforce org.
Go to Setup, search for "User Interface" and select User Interface
Scroll down to the Setup section, select
Use custom address fields
and Save.
What if you can’t enable it?
In some cases, you may not be able (or want) to enable Custom Address fields in a target org. If that’s the case, you’ll need to:
Exclude the fields from your Gearset deployment package, or
Refactor your metadata to avoid dependencies on
Custom Address fields
.