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 

Exception for "Object row was retrieved via SOQL "

Hello,

I am overriding a button.

 get below error message
"|EXCEPTION_THROWN|[EXTERNAL]|System.SObjectException: SObject row was retrieved via SOQL without querying the requested field: CustomObject__c.Name"

I making no query

What can be the reason ?
Best Answer chosen by Ab
Deepak Pandey 13Deepak Pandey 13
put the name field on your soql. without query this field you can not use on your vf pages....

All Answers

Deepak Pandey 13Deepak Pandey 13
put the name field on your soql. without query this field you can not use on your vf pages....
This was selected as the best answer
Amit Chaudhary 8Amit Chaudhary 8
Please post your code. You need to add same field in your SOQL query.
AbAb
i added hidden field it solved issue