In the master Details relationship

If the parent recors is deleted child record is also deleted right .

My requiremen is if parent record is deleted child record does not deleted . so how can i acheive this requirement through trigger can i control on detail object(child object) .

Would you please provide me any input on this .

Thanks in Advance,

  • 2
    Is there a reason why you use a master detail relationship ? Do you do any calculation with the children records and then you display them in the parent record? If not you could use a lookup relationship. You will still be able to have the parent child relationship but in this case the object are independent of each other. – Mihai Neagoe Jun 4 '15 at 15:52

This is a configuration setting when creating the Master Detail relationship

The allow reparenting setting, will allow master detail children to be reparented.

enter image description here

  • Surely only a help if all the child objects are moved to a new parent before the old parent is deleted... – Keith C Jun 4 '15 at 16:10
  • Thanks..@chris . but this question is how to control on child object in the master detail relationship. this option wil allow me to reparenting child object . but i don't want to reparent the child object. In that case how to achieve this.. – satish Jun 5 '15 at 10:03
  • In order to avoid cascade deleting, you need to reparent. You cannot orphan a child of a master detail, so your only other option would be to reparent it. – Chris Duncombe Jun 5 '15 at 11:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.