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
rams123rams123 

how to update all the child objects records with another parent record?

I have 2 account records lets take "acc1", "acc2" and here i want to delete "acc1" and  i need to transfer all the related data of "acc1" to "acc2". It means i need to update parent id of all the related records (from differenct child objects) with "acc2".

If any one knows please suggest me on the same. 
Carlos Campillo GallegoCarlos Campillo Gallego
Hi rams123

If this logic has to be triggered when acc1 is deleted, you have to write a trigger, and perform the reparenting before delete.

Cheers.