I checked that the invoice still needed a payment ...
# suitescript
b
I checked that the invoice still needed a payment and was open, we didn't pass a line number (suggested by the documentation), internal id of invoice is there, apply is set to true....I looked in the NetSuite forum and it seems like this question gets asked over the years with no solution being given