How to find which object is used in which apex class or trigger.Ex I want to find apex classes where account object is used.
1 Answer
You can use a Metadata Dependency Query, as outlined here. They provide an example in the docs:
SELECT MetadataComponentName, MetadataComponentType
FROM MetadataComponentDependency
WHERE RefMetadataComponentId = yourFieldId
You can use the Tooling API checkbox in the Query Editor tab of the Developer Console found in Salesforce, or another tool capable of calling the Tooling API.