AL icon indicating copy to clipboard operation
AL copied to clipboard

Error "The metadata object Page 0 was not found." when calling Page.RunModal(0, ExtRec)

Open gregoral opened this issue 8 years ago • 2 comments

I have stumbled upon a Page.RunModal(0, "Ext Record") issue.

AL Extension Version: 2.0.47152 Server Version: 13.0.24690.0-RS

When I call Page.RunModal(0, "Ext Record") on the latest build I get the following error: The metadata object Page 0 was not found.

The expected behaviour is to run the default page for the record passed as parameter.

Example of the "offending" page.runmodal call:

trigger OnAction()
var
    TestCode: Record "Test Code-Xyz";
begin
    TestCode.FindFirst();
    if Page.RunModal(0, TestCode) = Action::LookupOK then;
end;

I have attached a test.extension.app with source. Example code ( ID 60100 ) with test.codeunit functions attached.

test.lookup.2018 09 25.002.zip

gregoral avatar Sep 25 '18 11:09 gregoral

linking another potentially related issue: #3843 ( al.vsix version used plays a role )

gregoral avatar Sep 25 '18 13:09 gregoral

I experience the same issue everywhere I use Page.RunModal(0, xxx)

AL Extension Version: 2.0.47152 Server Version: DK Dynamics NAV 13.0 (24713)

MortenRa avatar Sep 26 '18 11:09 MortenRa