Contents
What will happen to child records if we delete a parent record in case of lookup relationship?
It’s behavior: Deleting a child record moves it to the Recycle Bin and leaves the master record intact, means when a child record is deleted, its master record is not deleted. But deleting a master record also deletes related child records.
Can we delete a child record in master detail relationship?
Child records will no longer be automatically deleted when the parent record is deleted. The security of the custom object will have to be set as it will no longer inherit the security of the parent. The report type that was setup upon the master-detail relationship creation will no longer be accessible.
How does Trigger Update parent record when any child?
When the trigger is called, it finds the parent of the child record, then from the parent reverses direction to find the full list of child records (including the child record that started the process). Once it has all of the children, it simply adds each of their values and stores the sum in a field on the parent.
When to delete child records when a parent is deleted?
Trigger for deleting child records when parent is deleted. Trigger for deleting child records when parent is deleted. when parent is deleted the related child records should be deleted. Thanks in advance.
How to update parent records in real time?
Real time scenarios:- Write a trigger on custom object where update parent records field whenever child record is inserted or updated. Create two custom object, both are associated with lookup relationship with each other
How to trigger parent record update in apex?
Create two custom object, both are associated with lookup relationship with each other If status field of child object marked true then should be status field of parent object automatic marked as true. Other related post that would you like to learn. Step 1:- Apex Class Trigger : checkboxStatus.apxt