Skip to main content
All CollectionsTroubleshootingData seeding / restoration
Resolving data deployment or CPQ error: "REQUIRED_FIELD_MISSING:Required fields are missing <xxx>"
Resolving data deployment or CPQ error: "REQUIRED_FIELD_MISSING:Required fields are missing <xxx>"

Explanation of the data deployment or CPQ error "REQUIRED_FIELD_MISSING:Required fields are missing:", and guidance on how to fix it.

David Runciman avatar
Written by David Runciman
Updated over 8 months ago

The error REQUIRED_FIELD_MISSING:Required fields are missing: <xxx> (where <xxx> refers to a specific field(s) referenced in the error message) 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;

  • the referenced object was included in the same data deployment, but failed.

What causes the error during data deployment?

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:

Scenario 1: 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 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.

Scenario 2: The referenced object was not deployed successfully, so we don't have a valid value to insert in the lookup field. In the screenshot above, if the deployment of the Opportunity records failed, we will not have a valid value (Salesforce ID) to insert in the field OpportunityID on the child object OpportunityLineItem.

How do I fix the error in data deployment?

Scenario 1

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.

Scenario 2

In this case you can focus on solving the error that prevented a successful deployment of the parent object. The REQUIRED_FIELD_MISSING error on the child object will then be resolved automatically.

Does the error happen when running External ID setup wizard, or during CPQ deployment?

It may happen that one of your CPQ objects, for example Product2, fails when you run Gearset External setup ID wizard to prepare your orgs for CPQ deployments.

If you have already tried to deploy that object via 'Compare and deploy' by adding the object to your CPQ filter (i.e. Product2 on which we've seen this error happening), the solution may be the following:

  • One of your products may contain a blank (null) field referenced in the error message.

Resolution:

You can resolve the issue in two ways:

  • Through assigning a value to the erroring field(s), or

  • By removing the erroring field entirely from a product in your source org (in scenario where you've identified that the erroring field is empty within a product).

On below example we're seeing that during CPQ deployment, the affected fields were MDM_Master_Record_Id__c and MDM_Service_ID__c.

Note: If this solution doesn't quite work for your particular scenario, feel free to reach out to us via in-app chat.

Did this answer your question?