0

I am trying to find the unused methods using the Query Editor in Developer Console.

I have checked Use Tooling API.

Running SOQL like below:

SELECT Id FROM SymbolTable WHERE externalReferences = NULL

But getting this error:

SELECT Id FROM SymbolTable WHERE externalReferences
               ^
ERROR at Row:1:Column:16
sObject type 'SymbolTable' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.

What I am missing here?

2
1

You need to query the field from the ApexClass object first, as seen here

https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_apexclass.htm

Also

If there is not a cached version of SymbolTable, it will be compiled in the background and the query might take longer than expected. The SymbolTable returned from ApexClass does not contain references; to retrieve a SymbolTable with references, use ApexClassMember.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.