Dear All,
I am working on a customization in Business Central where I want the posting routine for Purchase Orders (POs) to derive the amounts and dimensions for the General Ledger Entries from a custom table that I have linked to the Purchase Lines.
This custom table contains the following fields:
-
DocumentNo
-
LineNo
-
Amount
(split into sublines in percentages summing to 100%) -
Dimension1
-
Dimension2
-
Dimension3
-
Dimension4
-
Dimension5
Each subline entry includes its own dimension values across Dimension1 to Dimension5.
Requirement:
During PO posting, instead of using the default Purchase Line amount and dimensions, the system should read and use the split amounts and their corresponding dimensions from this custom subline table.
I want also the Preview Posting to work as native way so that I can see whether the entries behave as I want in this requirement.
I have attempted to subscribe to relevant events in the standard codeunits to achieve this customization, but so far, I have not been successful.
I would greatly appreciate any guidance or suggestions on how to approach this. Specifically:
-
Which events or codeunits would be best to extend or override or subscribe to?
-
what is the best way to do it?
-
If this is not possible how can I customize my independent posting routine especially that will make item ledger entries and others to be affected. At least General journal line has GL account and Fixed asset Account Types but no Item