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
John Manager Training DepJohn Manager Training Dep 

how to identify the objects that an apex accesses and how to find the apex that an object accesses?

Hi Team,

How to identify the objects that an apex accesses and how to find the apex that an object accesses?

Many Thanks in advance!
Neha AggrawalNeha Aggrawal
Hi,

You can identify the Apex triggers on an object by going to the object definition in setup.

User-added image

So for the trigger "UpdatePhoneNumbersAfterSaveAccount" above, Account is the trigger object.
You can identify which other objects/fields the trigger might be acting on by reading the trigger and class code. You can also use change sets to identify the dependencies in a trigger/class. 
Go to Outbound Change Sets in setup -> Create New Change Set->Add->Salect Apex class in Component Type-> Choose the Apex class from the list -> Add to ChangeSet
User-added image

On the next screen click on View/Add Dependencies. It will show you all custom fields/objects being used in the class.

Let me know if this helps.
Thanks.