Is it possible to write a script that would apply ...
# general
n
Is it possible to write a script that would apply credit memos to the oldest outstanding invoices when credit memos are loaded via CSV import?
s
I don’t think you need script there is an option to apply if I’m not wrong.
n
Yes, Sam. There is an option to apply if you reference "applied to" on the CSV import. So if invoice reference is given, the credit memo can be applied to the correct invoice. But I was asking about an API or SuiteScript sample to apply loaded credit memos automatically to oldest outstanding invoice without having to reference invoice number on the import, if that makes sense.
r
That should be possible with a After Submit User Event script