You need to sign in to do that
Don't have an account?
test vijay
SObject row was retrieved via SOQL without querying the requested field + apex
hello Developers,
I am facing Below error while I execute my batch class through test class.
SObject row was retrieved via SOQL without querying the requested field: Contract.SBQQ_Quote_r
can anybody help me to resolving this.
Thanks in advance
I am facing Below error while I execute my batch class through test class.
SObject row was retrieved via SOQL without querying the requested field: Contract.SBQQ_Quote_r
can anybody help me to resolving this.
Thanks in advance
this is common error and solutin is very easy.
I think you are passing soql query through test class. In that query you are missing some fields that is using into batch class.
for example if you are trying to use Contract.Name,Contract.SBQQ_Quote_r but you are not passing SBQQ_Quote_r field via query then you can face this error.
let's have an another example for understanding. the solution of above example is that
List<Account> accList = [SELECT Id, Name,Industry FROM Account WHERE Name like ='%test'];
let me know if it helps you and marking it as best answer.
Thank you