MyRapidi
MyRapidi

Search our Wiki

Invalid Cross Reference Id [INVALID_CROSS_REFERENCE_KEY]

This occurs when you attempt to update / insert a lookup relationship to the User or Profile object and the Id value is Invalid. And it seems that this error message is reserved for user and profile IDs.

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 ].

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.