REQUIRED_FIELD_MISSING: meaning and how to fix it

Data and DML Checked against the official docs on Source: SOAP API Developer Guide: Core Data Types, StatusCode

Quick answer

REQUIRED_FIELD_MISSING: The record is missing a value for a field that is required by the platform (such as Name), by the field definition, or by the page layout used through the API call. Start with: Look at the field names in brackets and set a value for each one before the insert or update.

Typical message: REQUIRED_FIELD_MISSING, Required fields are missing: [Name]

Cause

The record is missing a value for a field that is required by the platform (such as Name), by the field definition, or by the page layout used through the API call.

How to fix REQUIRED_FIELD_MISSING

  1. Look at the field names in brackets and set a value for each one before the insert or update.
  2. For a custom field, check whether the field itself is marked required in its definition.
  3. In a data load, check the CSV column mapping and blank cells.
insert new Contact(FirstName = 'Ada'); // LastName is required

Have a different message? Paste it into the error decoder, which matches it against 45 common Salesforce errors in your browser.

Frequently asked questions

What does REQUIRED_FIELD_MISSING mean in Salesforce?

The record is missing a value for a field that is required by the platform (such as Name), by the field definition, or by the page layout used through the API call.

How do I fix REQUIRED_FIELD_MISSING?

1. Look at the field names in brackets and set a value for each one before the insert or update. 2. For a custom field, check whether the field itself is marked required in its definition. 3. In a data load, check the CSV column mapping and blank cells.

More Data and DML errors

SFDX Talk is unofficial documentation. It is not affiliated with, endorsed by, or sponsored by Salesforce, Inc. Message text varies slightly by release and context, so confirm against the official page before relying on it.