I’m working on a snippet that will mass copy selected invoice records from one model to another, which also includes child invoice line records. I’ve successfully added the new invoice row(s) and new invoice line rows but because the parent invoice rows aren’t saved, I don’t have parent Salesforce IDs for the child rows. How can I link the new child row(s) to an unsaved parent? I could just save the new invoice rows, and loop through the response to then add the new invoice lines but I want to be able to review the new invoices before they’re saved.
In the screenshot, the top table shows the original invoice(s) and lines that will be selected to create new invoice(s) in another object. The bottom half shows the new invoice row and child invoice line records that are ready to be saved but are missing the parent ID (invoice number column).
Question
Specifying parent ids of multiple new parent & child rows?
This topic has been closed for replies.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.