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
ahonahon 

clone child record (and all related records) from button on parent object

Requirement is - clone a child record and all of its related records from a button. My flow is working when I debug, by passing the recordId of child record; however, the flow will not work from a detail list button on child related list. I assume because the right Id is not passing? 
 
Can someone please assist as to why?

**Screenshots are inconvienently not attaching/working.**
**Please refrain from commenting if not attempting to answer the question or assist with the problem.**
Best Answer chosen by ahon
ahonahon
solution: get records, create new record with status "open"; loop through existing records and update existings records to status: "void"

All Answers

ahonahon
Details of my flow -- 
  • Get child record; assign new variables and create new record (clone). Should only be 1.
  • Get grandchild records (multiple); loop through; assign variables; create new (multiple) grandchild records.
  • User should be able to check 1 line item on child record related list of parent object and by clicking button, the flow triggers 1 clone of child record and multiple clones of grandchild records.
Should the button be a detail list button? What could be the problem if, the flow works when debugging by passing child recordId, but not when clicking button.
ahonahon
solution: get records, create new record with status "open"; loop through existing records and update existings records to status: "void"
This was selected as the best answer