microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
733 stars 243 forks source link

Pageextension trigger OnAfterGetCurrRecord not fired #4925

Closed ajkauffmann closed 5 years ago

ajkauffmann commented 5 years ago

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:

Frederig commented 5 years ago

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

AndreyKorepanov commented 5 years ago

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

bwdeleeuw commented 5 years ago

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

geeknikolai commented 5 years ago

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

GregoryAA commented 5 years ago

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