+ Start a Discussion
Developer129Developer129 

How to access child object 2,3 level down in Trigger

Hi,

I am fairly new to salesforce. I was working with triggers and would like to know how I can access a child object two three levels deep in a trigger. e.g. the trigger is for Object A and it has child B which has child C , now I want to access object C's fields in the Object A trigger.

Thanx

Best Answer chosen by Admin (Salesforce Developers) 
ScoobieScoobie

You'll have to get into SOQL there

 

SELECT Id FROM childB where objecta = objectA.Id

SELECT Id FROM ChildC where childb = childb.Id