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
programmer4hireprogrammer4hire 

insufficient access rights on cross-reference id error

I am receiving the following error when deploying my code from the sandbox environment to production:

 

package.xml:insufficient access rights on cross-reference id

 

I've tried looking up this error in past posts, but the situations don't seem to be the same.  Any suggestions are welcomed!

Best Answer chosen by Admin (Salesforce Developers) 
programmer4hireprogrammer4hire
It was actually an issue with the way I was deploying the code.  Instead of deploying from my Eclipse workspace folder, I now use Ant to retrieve only the necessary code and put it into a different folder.  I then deploy the code from there.

All Answers

BritishBoyinDCBritishBoyinDC
It often means you are referring to an id/record that doesn't exist in Production but does in Sandbox - are you doing a select on a record type or something and then trying to use that in the code?
programmer4hireprogrammer4hire
It doesn't appear to be, I've double checked all the code and we even refreshed the sandbox to see if that worked, but the error still appears.
programmer4hireprogrammer4hire
It was actually an issue with the way I was deploying the code.  Instead of deploying from my Eclipse workspace folder, I now use Ant to retrieve only the necessary code and put it into a different folder.  I then deploy the code from there.
This was selected as the best answer