This trick has nothing to do with the OMA but I really want to share it. Did you ever had to search for a COMMIT? The command CONSISTENT can help you with that.
This command is specially build to make sure that at the end of a transaction the G/L Accounts are in balance. In codeunit “Gen. Jnl.-Post Line” you will see the following C/AL statement:
(BalanceCheckAmount = 0) AND
(BalanceCheckAmount2 = 0) AND
(BalanceCheckAddCurrAmount = 0) AND
(BalanceCheckAddCurrAmount2 = 0));
If you put a COMMIT somewhere is the posting routine after the consistency of the “General Ledger Entry” was set to false you will get the following beautiful error:
So if you have to find a COMMIT someday the only thing you have to do is first set a random table to CONSISTENT(FALSE) and the debugger will bring you to the first COMMIT.
PS: Kudos goes to rmv_RU. This topic was the first time I read about this.Explore posts in the same categories: Object Manager