Hey guys! I am making a script that creates a customer payment for a bunch of invoices. The script will load a CSV file that has a list of Invoice Internal ids. When I go to create the line items for the applied to tab I am getting an error message
“You have attempted an invalid sublist or line item operation. You are either trying to access a field on a non-existent line or you are trying to add or remove lines from a static sublist.”
customerPayment.selectNewLineItem('apply')
customerPayment.setCurrentLineItemValue('apply', 'internalid', 1747898)
customerPayment.commitLineItem('apply')
Any insight would be greatly appreciated!(Going to be re-writing this script into 2.0 while I wait and see if anyone has any suggestions.)