INVALID_CROSS_REFERENCE_KEY, invalid cross reference id: [] Exception in Salesforce

INVALID_CROSS_REFERENCE_KEY, invalid cross reference id: [] Exception in Salesforce

INVALID_CROSS_REFERENCE_KEY

1. If the user doesn’t have access to the Lookup or Master detail relationship records when they are updating a record with it.

2. If the user is trying to update the record with the OwnerId and the owner doesn’t have access to the record.

3. This also occurs when the Task record is created with blank or null Assigned To(OwnerId) field.

4. If the issue is happening after listening to Platform Event and updating the record, then set “Publish After Commit” as the Publish Behavior.

Leave a Reply