When you create a payment from an invoice, NetSuite automatically clicks the apply checkbox in the apply sublist that corresponds to the invoice you created it from.
I'm trying to figure out when that occurs so I can set the department and account depending on some values on the invoice.
I've tried pageInit(), fieldChanged(), sublistChanged(), and postSourcing(). The only place I can get it to work from is postSourcing(), but it's costly since it gets called every time a field is changed by sourcing. I feel like I must be missing something obvious here.