E2120 Invalid Cross Reference Id

The INVALID_CROSS_REFERENCE_KEY error in Salesforce typically means that you're trying to reference a record that either:

  1. Does Not Exist – The referenced record ID is incorrect or doesn't exist in the system.
  2. Is Deleted – The record was deleted (sent to the Recycle Bin) and can no longer be referenced.
  3. Is Not Accessible – The user making the request lacks the necessary permissions to access the referenced record.
  4. Is of the Wrong Type – You're passing a record ID that belongs to the wrong object (e.g., using an Account ID where a Contact ID is expected).

E2120 - ECE_SForceDataError: We got an error back from SalesForce when trying to update or insert data in SalesForce: Error returned from SFDC on update: [message: invalid cross reference id , statusCode: INVALID_CROSS_REFERENCE_KEY ].

Possible Solutions:

  • Double-check the ID: Ensure the referenced record ID is valid and exists.
  • Verify access: Confirm that the user has the necessary permissions to view/edit the record.
  • Check if it's in the Recycle Bin: If so, restore it or use a different valid record.
  • Ensure the correct object type: Confirm that the ID belongs to the expected object.


A good exercise is to take the ID throwing the error and put it at the end of the Salesforce URL (easier in Salesforce Classic) to confirm if the record actually exists or is of the correct type.