Modify Child Records using copyMasterDetailButtonHandler

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • In Progress
I am using the copyMasterDetailButtonHandler and recursively loop through 2 descendant relationships.  The relationship is like this:

Product --> (has many) --> Product Costs --> (has many) --> Product Details

My question is this, when I use the copyMasterDetailButtonHandler, is there a way to modify the records of "Product Details" during the process.

What I need to do is copy the parent record with all child records, but change a field "quantity" of all child records to 0.

Any ideas?

Thanks in adavnce
Photo of GH

GH

  • 616 Points 500 badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Are you using the process to copy the Parent record you're viewing or are you pulling the Child records from the same Parent each time?
Photo of GH

GH

  • 616 Points 500 badge 2x thumb
Parent record I am viewing.   Different child records for different parents.