AL icon indicating copy to clipboard operation
AL copied to clipboard

Pageextension trigger OnAfterGetCurrRecord not fired

Open ajkauffmann opened this issue 7 years ago • 5 comments

Describe the bug It seems that the OnAfterGetCurrRecord trigger in a pageextension only fires when there is code in C/AL. However, when you set a breakpoint on the code in this trigger, then the debugger stops at the breakpoint. After that, the trigger works like expected, until you publish the extension again or the server is restarted.

A similar issue was reported earlier: https://github.com/Microsoft/AL/issues/1383

To Reproduce Steps and to reproduce the behavior: Create a pageextension for a page that has no code in the OnAfterGetCurrRecord trigger, e.g. for Page 15 Location List. Add a trigger OnAfterGetCurrRecord to the pageextension and add some code to it, a message will do the job. Publish and run the extension, the code will not be executed. Set a breakpoint on the code and publish again. The debugger will now stop at the code. Stop the debugger and the code will now continue to run.

AL Code to reproduce the issue

pageextension 50101 LocationListExt extends "Location List"
{
    trigger OnAfterGetCurrRecord()
    begin
        Message('Hello from OnAfterGetCurrRecord');
    end;
}

Expected behavior The OnAfterGetCurrRecord trigger in a pageextension should always execute, regardless of C/AL code in the base object.

Versions:

  • AL Language: 3.0.118998
  • Business Central: Platform 14.0.31606.0 + Application 31632 (W1 14.1)

ajkauffmann avatar Apr 24 '19 12:04 ajkauffmann

Any update on this? This is blocking some functionalities at the moment

Frederig avatar May 17 '19 10:05 Frederig

Hi @Frederig, it is fixed in the latest daily build, but not fixed yet in 14.x

AndreyKorepanov avatar May 20 '19 09:05 AndreyKorepanov

Will this be in CU2 of the April 2019 release? It is not working in CU1

bwdeleeuw avatar Jun 20 '19 18:06 bwdeleeuw

Still not working on 14.1.33107.0... When can we expect this?

geeknikolai avatar Jun 27 '19 05:06 geeknikolai

Can you provide any deadline when this issue will be fixed?

GregoryAA avatar Jul 19 '19 12:07 GregoryAA