Is there a way to validate GL Account from a customization using an adapter?

Is there a way to validate GL Account from a customization using an adapter?
What I mean exactly is to check if all dynamic mandatory segments are filled, etc … before saving the record.
If the account is invalid you get an error as follows saving time:

Invalid GL Account : 000000|00|0000||etc
Segment SegmentName is mandatory.
Please review Lines/GL Analysis Tab.
Program: Erp.Internal.Lib.TranGLCBO.dll
Method: ValidateGLAccount

I want the same thing, but before saving as in providing the GL account with all segments a parameter of a function and get specific error message if wrong.
Can the the ValidateGLAccount server side method in TranGLCBO be called using a adapter?
I tested GLAccount.ValidateGLAccount method in BL tester, but that is an entirely different thing from what i can see.
I’d be grateful for any suggestions. thanks

Welcome @miki!

This would seem to be a simple request but it gets a bit complicated because of the way Epicor posts to the G/L. Unlike other ERP systems, Epicor has a very powerful Posting Engine that allows dynamic posting to multiple segments and multiple books. This is driven by Document Types, GL Controls, and Posting Rules. You can read all about it in the Posting Rules Technical Reference.

Where are you trying to validate the account number?


Hi Mark … thanks for getting back. I’ll certainly check the posting rule reference. I’m trying to do this on the AP Invoice entry screen where we’re automating adding job lines in bulk with accounting reference from user input.

If you have the GL Controls on your Product Group and Product Groups on your Jobs, then the correct WIP accounts should be hit during AP Invoice Entry.