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
Sagar Hinsu 11Sagar Hinsu 11 

How to use SymbolTable of tooling api

Hello,
I want to use tooling API. In tooling API i want to use SymbolTable.
In SymbolTable I want externalReferences.methods, externalReferences.name, externalReferences.references.
I will be very Thankful if any body can help me.
Daniel BallingerDaniel Ballinger
You can extract the SymbolTable (https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_symboltable.htm) from the field with the same name on ApexClassMember (https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_apexclassmember.htm) or ApexTriggerMember. The externalReferences are directly accessible from the SymbolTable.

I typically extract a single SymbolTable at a time for a single Apex class or trigger. Before doing so I use the Tooling API to force a compile of the class in question. This ensures the SymbolTable exists.