How to get Visual Studio Code to call LOADPACKAGEDATA when pressing F5
We have a *.navxdata file in our extension.
Is it possible that LOADPACKAGEDATA located in our service upgrade codeunit can be called when pressing F5 in Visual Studio Code ?
Because this data is essential for testing/programming the extension.
Please advice how to if possible.
I have another - opposite issue. When I
- press Ctrl+F5
- fill data in my extension
- go to : Extension management
- Uninstall my extension
- Unpublish my extension
- go to VS Code and press Ctrl+F5 once again, all data that I inputted before - exist!
I don't understand how it works, cos I don't have any upgrade codeunits ;) This is bug or feature ? ))
@AMCJN - the upgrade codeunits for V2 are currently undergoing changes so it's not possible to hook up the LoadPackageData call to F5
@dkatson - this is currently intentional, but not complete. In a few updates it will be possible to decide what happens to the extension data when unpublishing.
Thanks Stan for the answer.
But does the LoadPackagesData works, when the extensions is Publish/Installed normally ? We are quite dependent on that our package data is loaded when installing the extension, otherwise we/the customer can not use the extension for anything.
Unfortunately it looks that LoadPackageData is not re-enabled yet. The API will be finalized by November Update at the latest.
It will be available in October Update. This is the way to use it:
codeunit 70022222 InstallCu
{
Subtype = Install;
trigger OnInstallAppPerCompany();
begin
NavApp.LoadPackageData(700000001);
end;
OR
trigger OnInstallAppPerDatabase();
NavApp.LoadPackageData(700000001);
begin
end;
}