Invoice Duplication Script Trouble
I have the attached script which is supposed to duplicate the line items on my invoice as well as any relevant contact information. The problem I'm having is that this script duplicates the contact information from the invoice I trigger the script from, but duplicates the line items from the last record in the found set.
For now, I've been having employees find a particular invoice and execute the script when it's the only record in the found set. To be clear, I want the script to execute from the record I'm on in any set (regardless of # of records present) and have it duplicate those line items, not the ones from the last record in addition to the contact information. Right now, it's duplicating information from two separate records.
(The end of the script just has a few more SetField commands and then "End If")