Try Microsoft Edge
A fast and secure browser that's designed for Windows 10
How do i upgrade my extension v1(NAVX) without loosing data?
i have reffered below links
and also i have below quesations.
1. NAVAPP.GETARCHIVERECREF how this function works and what is NAVAPP(installed app or Archived data app?)
2.NAVAPP.RESTOREARCHIVEDATA here also NAVAPP which one can take?
is this possible to debug upgrade code unit then how?
any other way to upgrade data for extension 1 not through AL?
Please suggest me to resolve?
do you have any table data changes between your V1 version to V2?
Thanks for the reply, data changes means?
I have uninstalled extension1 and data is archived automatically. And I have changed some code in code unit. Again created a package and installed in version 1.1.
Here in the step I am lossing my all custom tables data. I need to restore archive data to my tables when I install new version.
This is NAVX package extension from cside not AL.
Please suggest me.
You need to create an Upgrade codeunit and use NAVAPP.RestoreArchiveData(XX) to restore the archived data of table with ID = XX. NAVAPP contains th archived data of the extension that you're upgrading.
i have used NAVAPP.RestoreArchiveData(XX) in my upgrade codeunit but it's not working for me. and here NAVAPP which app should consider installed app or archived app.
Please let me know.
NAVAPP is the archived app. Can you post the upgrade codeunit code?
Please find below upgrade codeunit.
OBJECT Codeunit 55055 Upgrade Mgt.
LOCAL PROCEDURE RestoreFieldsInModifiedTables@1100084005(FromField@1100084004 : Integer;ToField@1100084005 : Integer);
Field@1100084001 : Record 2000000041;
AllObj@1100084000 : Record 2000000038;
WITH AllObj DO BEGIN
SETRANGE("Object Type","Object Type"::Table);
IF FINDSET THEN
Field.SETRANGE(TableNo, "Object ID");
Field.SETRANGE("No.", FromField, ToField);
IF NOT Field.ISEMPTY THEN BEGIN
UNTIL NEXT < 1;
LOCAL PROCEDURE RestoreAppTables@1100084006(FromTableID@1100084003 : Integer;ToTableID@1100084004 : Integer);
AllObj@1100084005 : Record 2000000038;
SETRANGE("Object Type", "Object Type"::Table);
SETRANGE("Object ID", FromTableID,ToTableID);
i am getting this error when i uninstall and install same version of NAV App.
i got this below error
Microsoft Dynamics NAV
Could not upgrade the NAV extension 'GS07Ext9' due to the following error: 'The following tables contain data but cannot be upgraded because the relevant upgrade
instructions are missing: 23 (Vendor), 38 (Purchase Header), 39 (Purchase Line), 120 (Purch. Rcpt. Header), 121 (Purch. Rcpt. Line), 122 (Purch. Inv. Header),
123 (Purch. Inv. Line), 291 (Shipping Agent), 312 (Purchases & Payables Setup), 7317 (Warehouse Receipt Line), 7319 (Posted Whse. Receipt Line).'.
any one face this issue.
Note: This is extension V1 from CSide not from AL.
Does your extension add custom fields on that tables?
Yes, I have custom tables on that tables.
Above issue resolved when i restart the service but here is problem i am facing for up-gradation of extension.
Did you see above upgrde codeunit i have posted? any issue on this?
when i manually run that above code unit i didn't get any NAVAPP. it is showing that NAVAPP not intialized.
when this code unit will run? when publish the package or when install the package?
can you please let me know the process of extension V1 upgrade process.
When you install an extension, data from the previous version are copyed in a "backup table" called NAVAPP. You cannot manually run this upgrade codeunit.
For more info:
Check expecially this last link. I think you need also to handle the restore of the custom fields added on the standard tables by your extension.
Business Applications communities