The REQUIRED_FIELD_MISSING error can happen during a data deployment if the object that you’re deploying includes a required lookup field and you’ve chosen to exclude the object referenced by that field.

You may also see this error if you are trying to deploy binary data: Gearset does not currently support deploying binary data, so in this case you will need to exclude the binary items from your deployment.

What causes the error?

Lookup fields on a Salesforce object are frequently used to associate two records together in a relationship.

If the lookup field is also a required field, it must have a value before a record can be saved. A custom lookup field is typically made a universally required field via a checkbox from the Salesforce UI as shown below:

Gearset will not deploy the records from an object with a required lookup field if you have excluded the object referenced by the lookup field.

The error is can be triggered if you attempt to deploy a detail object in a master-detail relationship while excluding the corresponding master object in the deployment.

How do I fix the error?

The main way of avoiding this error is to make sure that you include the relevant dependencies in your deployment. After you have selected the primary object that you want to deploy records from, Gearset's data loader will ask you which related objects you want to include in the deployment. This is the second step of configuring your data deployment.

In the screenshot below, the objects listed under 1. How do you want to match existing records? on the left side of the screen are the objects already selected during the first step of the configuration. The objects listed under 2. Which related objects do you want to include? on the right side of the screen are all the other objects in the dependency hierarchy (i.e. a list of the dependencies of the dependencies) referenced by the primary objects on the left.

You will need to include the object referenced by the required field at this stage for Gearset to deploy the record to your target.

Alternatively, for the purpose of the deployment, you may choose to filter and exclude the record(s) that give rise to the error.

Did this answer your question?