INVALID_TYPE_ON_FIELD_IN_RECORD: 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

INVALID_TYPE_ON_FIELD_IN_RECORD: A value does not match the data type of its field, for example text in a number field or a date in the wrong format. Start with: Check the field named in the message and its data type.

Typical message: INVALID_TYPE_ON_FIELD_IN_RECORD, Close Date: value not of required type: ...

Cause

A value does not match the data type of its field, for example text in a number field or a date in the wrong format.

How to fix INVALID_TYPE_ON_FIELD_IN_RECORD

  1. Check the field named in the message and its data type.
  2. Format dates as YYYY-MM-DD and datetimes in ISO 8601 for API and data loads.
  3. Remove thousands separators and currency symbols from number values.

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 INVALID_TYPE_ON_FIELD_IN_RECORD mean in Salesforce?

A value does not match the data type of its field, for example text in a number field or a date in the wrong format.

How do I fix INVALID_TYPE_ON_FIELD_IN_RECORD?

1. Check the field named in the message and its data type. 2. Format dates as YYYY-MM-DD and datetimes in ISO 8601 for API and data loads. 3. Remove thousands separators and currency symbols from number values.

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.