AL icon indicating copy to clipboard operation
AL copied to clipboard

Event request: Table 15, Before and After CheckGLAcc method

Open Wiechardt opened this issue 8 years ago • 2 comments

Hi there,

I am wanting to add a subscription to Table 15 to perform additional checks on the G/L Account using the CheckGLAcc method. Please can I ask that we get this method available for subscription?

Thanks, Wiechardt

Wiechardt avatar Oct 12 '18 08:10 Wiechardt

This procedure is External, so you can use it directly. Or add you own checks.

AlexanderYakunin avatar Oct 12 '18 12:10 AlexanderYakunin

Hi Alexander,

I don't want to call the method, I want to extend it and add logic whenever it gets called by using an Integration Subscription.

In other words, I am looking for a Published Event in Table 15 as follows:

LOCAL [IntegrationEvent] OnGLAccCheckGLAcc(GLAccount: Record G/L Account;)

If there is another way to extend the logic in this method on Table 15, please advise how this can be achieved?

This is the existing code in this method:

[External] CheckGLAcc() TESTFIELD("Account Type","Account Type"::Posting); TESTFIELD(Blocked,FALSE);

In NAV 2016/earlier I would have extended this method as follows:

[External] CheckGLAcc() TESTFIELD("Account Type","Account Type"::Posting); TESTFIELD(Blocked,FALSE);

// << Start of New Logic TESTFIELD(SomeField, FALSE); // >> End of New Logic

Regards, Wiechardt

Wiechardt avatar Oct 12 '18 13:10 Wiechardt