Error "The metadata object Page 0 was not found." when calling Page.RunModal(0, ExtRec)
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.
linking another potentially related issue: #3843 ( al.vsix version used plays a role )
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)