×
Menu
Index

How to upgrade NavSherpa to AL

This guideline should help you migrate NavSherpa from C/AL to AL in a fairly complicated scenario:
In a less complicated scenario (e.g. you do not need to transfer document mappings) just skip some of the following steps.
 

Prerequisites

 

Preparations in BC 140 (C/AL)

NavSherpa version 14.00.07 adds a new field NAV Record Position to SharePoint Document Mapping, SharePoint Record Mapping and SharePoint Workflow Mapping tables. This field stores related BC record ID in a text form and is used to match the mapping with a correct BC record in AL.
 
This field is blank at first, you need to fill it by running report NavSherpa Update Record Pos. (from the DEV environment) for all afftected list/library setups.
 

Upgrade function

The upgrade function is meant to run automatically during upgrade and fix the data, that are wrong for some reason. You will need it if some tables and fields have a different ID in C/AL - otherwise you can skip this step. For more details about upgrade code see Microsoft documentation: https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-upgrading-extensions.
 
We recommend to set up an upgrade tag to prevent the upgrade code to run more than once.
 
    procedure GetNavSherpaUpgradeToAL(): Code[250]
    begin
        exit('NavSherpaUpgradeToAL-20240129');
    end;
 
The upgrade function mainly uses UpdateTableAndFieldIDs from the NavSherpa Interface codeunit. This function goes through the list/library setups with affected BC table and updates the table and field IDs in all related records. The upgrade function can look as follows.
 
    procedure UpgradeNavSherpaToAL()
    var
        NSPInterface: Codeunit "NSP Interface";
        UpgradeTag: Codeunit "Upgrade Tag";
        FieldIDs: Dictionary of [IntegerInteger];
    begin
        if UpgradeTag.HasUpgradeTag(GetNavSherpaUpgradeToAL()) then
            exit;
        //Table has new ID in AL, but the field IDs did not change
        NSPInterface.UpdateTableAndFieldIDs(9082855028); //Asset Check Header
 
        //Table has new ID in AL and some fields has a different ID, too
        Clear(FieldIDs);
        FieldIDs.Add(90819106); //Active
        FieldIDs.Add(90820107); //Implementer By PR Type
        NSPInterface.UpdateTableAndFieldIDs(9081355013, FieldIDs);
 
        //Table has new ID in AL and some fields has a different ID, too + this transformation should be called only for some list/library setups
        Clear(FieldIDs);
        FieldIDs.Add(90819106); //Active
        FieldIDs.Add(90820107); //Implementer By PR Type
        NSPInterface.UpdateTableAndFieldIDs(9081355013, FieldIDs, 'INCDOC_DOCS|INCDOC_LIST');
 
        //Table has the same ID in AL, but some fields in a table extension has a different ID
        Clear(FieldIDs);
        FieldIDs.Add(9087655007); //UPN Login
        NSPInterface.UpdateTableAndFieldIDs(52005200, FieldIDs);
 
        //Set the upgrade tag and commit the data
        UpgradeTag.SetUpgradeTag(GetNavSherpaUpgradeToAL());
        Commit();
    end;
 

Manual Steps

After you finish the data migration and data upgrade, there are a few manual steps that you need to do to get NavSherpa running in AL.
 
Important: Before going live, make sure, that you disabled all automatic jobs in your BC 14! You certainly do not want two Business Central instances connecting and uploading files to one SharePoint.
 

New License Key

If you are migrating from Business Central 14 (C/AL version), your NavSherpa license key will not work with AL extension version. Please order the extension license key in advance and after migration enter the correct license key in NavSherpa Setup. Ensure that the license is valid for your VOICE account number.
 
 

Authentication

 
 

Run NavSherpa data upgrade to AL

Go to NavSherpa Setup and run action Start Data Upgrade to AL (run this action in each company, where you have NavSherpa). This will perform the last steps that are needed to update the data to AL version. If something goes wrong, fix the errors and run the action once more.
 
 
Note: Without the NavSherpa data upgrade there are some vital information missing in SharePoint List Setup table and your NavSherpa will not work properly.
 

Start NavSherpa Automatic Job

As the last step, create or start the job queue entry responsible for NavSherpa automatic jobs.
 
Important: Please ensure, that the automatic job in your old database is stopped by now and no users are adding documents there!