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
Chris BrinkChris Brink 

UNKNOWN ERROR: Object of class __PHP_Incomplete_Class could not be converted to string

In workbench, I'm trying to execute a very basic query as follows:

SELECT Count(Id) FROM Account WHERE RecordTypeId = '0124O000000NAuoQAG'

This is returning the error in the subject.  Could this be a server caching issue?
VinayVinay (Salesforce Developers) 
Hi Chris,

Query seem to be fine and was able to execute successfully.  Do you see same error in other instance?  It seem to be cache issue.

Thanks,
Adam CadamAdam Cadam

I had the same problem and was confused by it, but I think I've found the cause.

I think it is a Governor Limit issue which Workbench is not handling well.

Even when counting records for count(Id), the 50,000 record limit is enforced.

If you have more than 50,000 Accounts WHERE RecordTypeId = '0124O000000NAuoQAG', then I think this is the cause.

Workbench should handle the error that comes back from SF better, but it's free so I'm not complaining!
If it cuases real issues for you, then you could fork the git repo, debug it an post a PR to fix it!