Loading

Error 'INVALID_CROSS_REFERENCE_KEY invalid cross reference id' on export of CaseComment via Data Loader

Fecha de publicación: Jun 29, 2026
Descripción

Performing an export of CaseComment records using Salesforce Data Loader may result in the following error:
"INVALID_CROSS_REFERENCE_KEY: invalid cross reference id"

Notes

  • This error is specific to orgs that have Self-Service Users.
  • Self-Service users do not exist as standard User records in Salesforce. They have their own record type and do not have standard User profile lookups. Because of this, cross-reference fields that attempt to look up a photo URL for a Self-Service user will fail with this error.
Solución

When exporting CaseComment records using Data Loader in orgs with Self-Service Users, the INVALID_CROSS_REFERENCE_KEY: invalid cross reference id error occurs because the CreatorFullPhotoUrl and CreatorSmallPhotoUrl fields attempt to resolve a photo URL for Self-Service users — who are not standard Salesforce User records. There are two workarounds.

Option 1: Exclude CreatorFullPhotoUrl and CreatorSmallPhotoUrl Fields

When exporting the CaseComment object with Data Loader, do not select the CreatorFullPhotoUrl and CreatorSmallPhotoUrl fields in your field selection. Excluding these two fields from the export eliminates the cross-reference lookup that causes the error.

Option 2: Use Data Export Instead of Data Loader

Alternatively, you can run Data Export from Setup to export CaseComment records. Data Export does not encounter this field-level cross-reference issue.

Número del artículo de conocimiento

000387979

 
Cargando
Salesforce Help | Article