You need to sign in to do that
Don't have an account?
Bhargav Surapaneni
self lookup getting all the parent records from child record
Hi,
I have a scenario where I need to count the number of the parent records( in the hierarchy) from child records in trigger.
But we don't know how many parent records are existing for a child.
Could you please help in approaching this using trigger on after insert.
Thanks in advance
Assuming you don't have an account with more than 100 generations above (parents), you could try the following code in your trigger.
Best regards.