To deploy a single field between orgs, the custom object to which the custom field belongs must exist in both the source and target orgs. When deploying this single custom field, there are two scenarios to consider: (1) the object for the field is new to the target; or (2) it already exists.
The object is new to the target
If it's a new custom object (i.e. it only exists in the source org), Gearset will try to deploy the whole custom object and its custom fields, without the option for you to choose which fields to deploy or not deploy.
Within Salesforce, a custom field must always belong to a custom object. If the custom object doesn’t exist in the target, then deploying only a custom field (without the custom object it belongs to) would leave that field orphaned.
A custom object that only exists in the source looks like this in Gearset:
NewObject's difference type is
New, and so none of the custom fields is available for deployment.
In this situation, there are two options if you want to deploy the
Id custom field from the source to the target:
Using the Salesforce UI, manually create a custom object in the target with the same name. After refreshing the comparison in Gearset, both the source and target have a custom object called
NewObject, and it's possible to select the
Idfield for deployment:
2. Deploy the entire custom object with all of its fields.
The object exists in the target
If the custom object exists in both the source and target, you'll have the option to choose which custom fields you want to deploy.
A custom object that exists in both source and target will look like this:
NewObject shows metadata for both source and target, so the custom fields can be selected for deployment.
To deploy the
Id custom field from the source to the target, select the field from the
New items tab: