function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ciro AlvarezCiro Alvarez 

Getting "invalid cross reference id" error

Hi, I have an API integration to update some custom fields on SF, the integration works fine I'm able to insert/update data to my SF custom fields.

Last week one of our customers created the custom fields on his sandbox and push them to production and the API started failing with the "invalid cross reference id" error, first I thought (I'm new to SF) this was a permission issue and check the field level security for those custom fields and everything looks OK, I'm starting to think this error is related with the push he did form sandbox to production. Any ideas?
Raj VakatiRaj Vakati
Can you check the field mapping for the new fileds created .. In your intergation make sure you are refering the correct values 
Ciro AlvarezCiro Alvarez
I checked the new custom fields names and they match my API integration, looks like the mapping is not an issue.
Joseph PescatelloJoseph Pescatello
I've seen this error when going from one environment to another when there is an ID in one environment that doesn't exist in the other. 
Richard Fiekowsky 3Richard Fiekowsky 3
Happens all the time in sandboxes. Error message in UI used to tell you the field, but not now (on my system at least). But, now UI displays "Unknown Record" in any field that would provoke this error. Since it is sandbox I just X my troubles away in each bad field.  
It would require some effort to arrange for this error in Production. But it can be done, mostly due to filters on Lookup fields or records recovered from backup systems or hard-coded record-ids or maybe User records that became deactivated.