Activity Forums Salesforce® Discussions How to refrain a child record from deleting once added to a master-detail relationship?

  • shariq

    Member
    September 12, 2018 at 6:02 pm

    Hi Avinish,

    I think you don't want to replace the master detail field value once added at the time of insert.

    You can write validation rule on it, for example - ISCHANGED(masterDetailField__c).

    This will give an validation error when the field value is updated to different from the first one.

    Well you can also do it at the time of creating field, just deselect the Allow Reparenting(Reparentable Master Detail) checkbox.

    Hope this helps.

  • Parul

    Member
    September 13, 2018 at 4:11 am

    Hi

    Once a child record has been added to master-detail relationship you have one option when you are creating the relationship deselct the checkbox of allow reparenting option.

     

    I think this may be the solution!.

     

    Thanks

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos