You need to sign in to do that
Don't have an account?
Suresh(Suri)
Is there any other way to retrieve grandparent id using grand child object
Hi All,
Is there any other way to retrieve grandparent id using grand child object in apex. Here am using sObject in this 3 different objects will recive based on object i want to identify like(sObjectType == Obj1__c.sObjectType) and pass the grand parent id into map like(GP GPid = GPMap.get((Id)sObj.get('GPids'));)
Thanks & Regards,
Suresh
Is there any other way to retrieve grandparent id using grand child object in apex. Here am using sObject in this 3 different objects will recive based on object i want to identify like(sObjectType == Obj1__c.sObjectType) and pass the grand parent id into map like(GP GPid = GPMap.get((Id)sObj.get('GPids'));)
Thanks & Regards,
Suresh
May I request you to please refer the below link for reference.
- https://success.salesforce.com/answers?id=90630000000hM7nAAE
- https://success.salesforce.com/ideaView?id=08730000000BqmsAAC
I hope it will be helpful.Best Regards
Rahul Kumar
Thanks for your quick reply, i have written a formula(GPids) field on child object(Childobj) like
Parent1__r.Parent2__c am getting an grand parent id
I want to just conform this formula is it work in
for (SObject SO : SOstoSend){
GP GPid = GPMap.get((Id)sObj.get('GPids'));)
}
shall i retrive the grand parent id using this way in apex?