Here is a high level of the flow
As you can see in the Get Records we are searching for commission Detail Records where the Sales_Invoice__c field = the SalesInvoiceIdforUpdate. This is a field that is updated from a Process Builder that gets called when the Sales Invoice field on the Commission Detail Record IS NOT EQUAL to NULL (as seen below).
We then add all the records that meet this criteria to a record collection variable and store some of the values from the commission details so we can use those on record create.
After that we enter the loop.
We then assign variables
답변 4개
Well, it's quite obvious that if you are looping over a collection and then adding them to a collection, then using that collection to create records, then obviously it will create multiple records.