When you manually create a payment journal, you do not populate the Amount field on the GL Journal Line. You open the Apply Entries page, set the Applies to ID and set the Amount to Apply on the Vendor Ledger Entry (VLE). When you click OK, it automatically updates the GL Journal Line Amount field.
Now I have created a payment journal from AL for a Vendor Recon System I am busy with. I set the GL Journal Line Amount field from the code to match the Vendor Ledger Entries. It creates perfectly and allows the user to just post the journal that was created. But this does not run through the validation that you normally have when you do it manually (and also does not cater fully for discounts and rounding that I have to calculate in the code).
How can I mimic the Apply Entries page behaviour from AL?
Thanks in advance.
Heinrich


Report
All responses (
Answers (