I want to automate payment allocation to invoices. Eg, if i have 1 payment that needs to be applied to 1 invoice and it needs to be allocated. I want this process automated rather than going into customer ledger and set applies to id and then post.
I wrote a code unit that takes the parameters and set applies to id, amount and applying entry for payment and invoice but posting fails.
I can't see any other entry that needs to be done before posting during Nav set aplies to id process.
I can't see any entry in gen journal line either.
Am I missing something that needs to be done before i execute CU 226 with the payment record ?