Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Salesforce
  3. Question
Salesforce

What can be the cause of the error: System.SObjectException: SObject row was retrieved via SOQL without invoking the requested field?

Asked by Dan Peters Aug 30, 2023 2.9K views 1 answer
Share

About this question

 I am getting the below-mentioned error, which looks like this:

Line: 4, Column: 1 System.SObjectException: SObject row was retrieved via SOQL without querying the requested field: Service_Contract_Products__c.Installed_Product__r. But when I am running the same code inside a class, I am not getting the error.

I am running this code with the logic that a Covered Product is an object. The installed product is the field present in Covered Product, and its status is the picklist field on the installed product.

Can I get any solution regarding this problem? 

Your answer

1 Answer

More Salesforce discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Salesforce Blogs

Guides, tips and career advice on Salesforce from JanBask experts.