+ Start a Discussion
SandrineSandrine 

Error while changing account on opportunity

Hello,

I have below error when i try to change accoutn on opportunity,

what can be probable reason
 
We hit a snag.
Review the errors on this page.
invalid cross reference id

.

I dont see any error in debug logs
Best Answer chosen by Sandrine
VinayVinay (Salesforce Developers) 
Hi Sandrine,

Try to run SOQL query in the developer console and check if you are seeing this error.

Also,  The field AccountId from Opportunity refers to an Account object can you re-check on that.

https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_opportunity.htm

Thanks,
Vinay Kumar

All Answers

AnudeepAnudeep (Salesforce Developers) 
Hi Sandrine, 

We usually see this issue if the Account record doesn't exist, or isn't accessible by the API user. Can you confirm if that is the case? Also, do you have any trigger on Account or opportunity? If yes, can you disable and make the change? 

Anudeep
VinayVinay (Salesforce Developers) 
Hi Sandrine,

Try to run SOQL query in the developer console and check if you are seeing this error.

Also,  The field AccountId from Opportunity refers to an Account object can you re-check on that.

https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_opportunity.htm

Thanks,
Vinay Kumar
This was selected as the best answer