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
AbAb 

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 Ab
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