How to prevent post G/L journal multi-lines debit and credit

Hi experts,

How could we code to prevent user post multi-lines debit and multi-lines credit in General Ledger Journal? I know this is a helpful function from Nav, but unfortunately customer they don’t want to use this. Thanks for read this and help!


You want to post single line with bal. account type or two lines with debit and credit?

Simply count the debit and credit lines and through error message if more than 1