Wednesday, May 1, 2019

How to point your Dynamics NAV Client to a specific Server Instance.

By default which database to connect is stored in a config file called ClientUserSettings.Config file.

In this case to fix the error ,the user need to update the ClientUserSettings.Config file and change the server and server instance key values to point to the TEST database.

The path for the ClientUserSettings.Config file is
C:\Users\\AppData\Local\Microsoft\Microsoft Dynamics NAV
You need to change the below three key values and make sure they point to the TEST Server Instance.


Once you change and restart the NAV client it will open it successfully, given that user is setup properly.

In the case of the new user has not been granted permission to access the specific database you may receive the below error.

image

Most of us must have seen this error when we try to login into NAV, the reason for this error is the user who is logging into NAV does not have access to the database or the user is not setup in NAV RTC.
To fix the above error, you need to setup the user in NAV.  All the steps to create a new user is in the below Url.
In another scenario when you have multiple databases and when the user is trying to login into a database, where the user is already setup as user in one of the database but he gets the above error and NAV client closes when he clicks OK.
Let’s assume we have two databases in this scenario TEST and PRODUCTION.
The user who is trying to login, has access to the TEST database but he does not have access to the PRODUCTION database, so in this case the error is valid since the NAV is trying to login into PRODUCTION database by default. But the real issue is NAV does not provide a way to login into TEST database, as it shuts down when you click OK. 

Saturday, December 8, 2018

How to Install a Windows Client Control Add-in Assembly (Dynamics NAV)

How to Install a Windows Client Control Add-in Assembly (Dynamics NAV)

Windows Client Control Add-ins in Microsoft Dynamics NAV are delivered as .NET Framework–based assemblies (.dll files). To use a control add-in in the NAV Windows (RoleTailored) Client, the corresponding assembly must be available on the computer where the client is running.

In certain development scenarios—such as compiling objects that reference a control add-in—the assembly must also be installed on the machine running the NAV Development Environment.


Installation Options for Control Add-ins

Control add-in assemblies can be installed using two main approaches:

  1. Manual installation on the NAV Windows Client or Development Environment

  2. Automatic deployment via the NAV Server or database

Each approach has different use cases, explained below.


Option 1: Manual Installation on the NAV Windows Client

This method is useful for:

  • Development and testing

  • Environments without NAV Server access

  • Troubleshooting add-in loading issues

Steps:

  1. On the computer running the NAV Windows Client, copy the control add-in .dll files.

  2. Paste them into the Add-ins folder of the NAV client installation.

Default path:

C:\Program Files (x86)\Microsoft Dynamics NAV\100\RoleTailored Client\Add-ins

Note:
You can place assemblies inside subfolders within the Add-ins directory. This is recommended when working with multiple add-ins or dependencies.

Once copied, the control add-in becomes immediately available to the client.


Option 2: Automatic Deployment of Control Add-ins (Recommended)

NAV supports automatic deployment of control add-ins when:

  • The control add-in name matches the assembly name

  • The assembly complies with NAV Server configuration limits (chunk size, upload size, allowed file types)

With automatic deployment, assemblies are centrally managed and deployed to clients as needed.


How Automatic Deployment Works

When a NAV Windows Client requires a control add-in (for example, when opening a page that uses it), the following sequence occurs:

  1. The client checks its local Add-ins folder:

    C:\Program Files (x86)\Microsoft Dynamics NAV\100\RoleTailored Client\Add-ins
  2. If the assembly exists locally, it is used immediately.

  3. If not found, the client requests the add-in from the NAV Server.

  4. The NAV Server checks its own Add-ins folder:

    C:\Program Files\Microsoft Dynamics NAV\110\Service\Add-ins
  5. If found, the server deploys the assembly to the client.

  6. If not found on the server, the assembly is retrieved from the NAV database.

  7. The assembly is then deployed to the client’s temporary folder:

    %TEMP%\Microsoft Dynamics NAV\Add-Ins

The deployed assembly remains available until a newer version is detected.


Version Updates and Add-in Caching

  • If the control add-in assembly is updated and its version number changes, NAV Server automatically deploys the new version.

  • Each version is stored in a separate subfolder under:

    %TEMP%\Microsoft Dynamics NAV\Add-Ins
  • Older versions are not automatically removed, but they are no longer used once a newer version is deployed.

This mechanism ensures version safety without impacting running clients.


Control Add-ins in the Development Environment

When compiling objects that reference control add-ins:

  • The development environment follows the same deployment logic

  • The required assembly is deployed to the current user’s temporary folder

This allows compilation and testing without manual copying.


Installing Control Add-ins on the NAV Server

To enable automatic deployment via the server:

  1. Copy the control add-in assembly to:

    C:\Program Files\Microsoft Dynamics NAV\110\Service\Add-ins
  2. Restart the NAV Server service if required.

This makes the add-in available to all clients connected to that server instance.


Importing Control Add-ins into the Database

This method is useful for:

  • Centralised deployment

  • Multi-server environments

  • Controlled version management

Steps:

  1. Create a .zip file containing the control add-in assemblies in the desired folder structure.

  2. In Dynamics NAV, search for Control Add-ins.

  3. Choose New.

  4. Enter:

    • Control Add-in Name

    • Public Key Token

  5. Choose Import and select the .zip file.

  6. Confirm and close the page.

The control add-in is now stored in the database and deployed automatically when required.


PowerShell-Based Management (Optional)

Control add-ins can also be managed using the NAV Administration Shell:

  • New-NAVAddin

  • Set-NAVAddin

  • Get-NAVAddin

  • Remove-NAVAddin

This is especially useful for scripted deployments and automation.


Summary

Windows Client Control Add-ins in NAV can be installed manually or deployed automatically via the server or database. Automatic deployment is the preferred approach for production environments, while manual installation is often used during development and troubleshooting.

Understanding how NAV locates, deploys, caches, and updates control add-ins is essential when performing upgrades, troubleshooting client issues, or transitioning legacy solutions.

Tuesday, September 4, 2018

How to Find and Understand Locking Sessions in SQL Server (Dynamics NAV)

How to Find and Understand Locking Sessions in SQL Server (Dynamics NAV)

Table locking is a normal but often confusing reality in any multi-user ERP system. In Microsoft Dynamics NAV, locking issues are especially common in manufacturing and service-based organisations, particularly during month-end processing.

At month end, finance teams post large volumes of transactions—such as G/L Entries, Item Ledger Entries, and Value Entries—which increases database activity. When multiple users attempt to update the same tables at the same time, SQL Server may place locks to protect data consistency.

This is when users start asking:

  • “Why is my system frozen?”

  • “Who is locking the table?”

  • “Why can’t I post my transaction?”

This article explains:

  1. What locking is (in simple terms)

  2. How to find blocking sessions in SQL Server

  3. What actions to take

  4. Advanced SQL blocking queries

  5. Why Dynamics NAV is particularly sensitive to locking


What Is Table Locking? (Simple Explanation)

When a user posts a transaction in NAV, SQL Server must ensure that data remains accurate and consistent.
To do this, SQL Server temporarily locks rows, pages, or entire tables while changes are being made.

If another user tries to access the same data at the same time, SQL Server may:

  • Make the second user wait

  • Or block the second transaction completely

This is called blocking, and it is not a bug—it is a safety mechanism.


Step 1: Identify Blocking Sessions Using SQL Server

The fastest way to see blocking activity is through SQL Server Management Studio (SSMS).

Basic Blocking Check

  1. Open SSMS

  2. Locate your Dynamics NAV database

  3. Right-click the database → New Query

  4. Run:

EXEC sp_who2;

Step 2: Understand the sp_who2 Output

This command shows all active SQL sessions.

The most important column is:

  • BlkBy → Blocked By

How to read it:

  • If BlkBy is empty, the session is not blocked

  • If BlkBy contains a number, that number is the SPID of the blocking session

What this tells you:

  • Who is being blocked

  • Who is causing the block

Once you locate the SPID shown in the BlkBy column, you now know which session is holding the lock.


What Should You Do Next? (Human First)

Before taking technical action:

  • Do not assume bad intent

  • Locking is almost always accidental

Best practice:

  1. Identify the user

  2. Call or message them

  3. Ask what they were doing

  4. Request them to exit NAV normally

This information is extremely valuable if the issue keeps happening.


Common Causes of Locking in NAV

  • Long-running posting routines

  • Network interruptions

  • Poorly designed custom code

  • Reports running during business hours

  • Workstations crashing while NAV is open

  • Missing COMMIT statements in C/AL code


If the User Cannot Exit NAV

Sometimes the user:

  • Is disconnected

  • Has a frozen client

  • Cannot respond

In these cases, you have two technical options.


Option 1: Resolve the Lock from Dynamics NAV (Preferred)

  1. Open Session List in NAV

  2. Identify the session holding the lock

  3. Press F4 (Delete) on the session

What happens:

  • The NAV session is terminated

  • SQL Server safely rolls back the transaction

  • Other users can continue working

✅ This is the safest method when NAV access is available.


Option 2: Resolve the Lock from SQL Server (Last Resort)

If NAV access is not possible, you can terminate the SQL session directly.

KILL <SPID>;

Example:

KILL 57;

⚠️ Important notes:

  • This forces the connection to close

  • SQL Server rolls back the transaction

  • Use only when absolutely necessary


Advanced SQL Queries for Blocking Analysis

1️⃣ See Who Is Blocking Whom (Detailed)

SELECT r.session_id, r.blocking_session_id, r.status, r.wait_type, r.wait_time, r.wait_resource, s.login_name, s.host_name, s.program_name FROM sys.dm_exec_requests r JOIN sys.dm_exec_sessions s ON r.session_id = s.session_id WHERE r.blocking_session_id <> 0;

This query shows:

  • Blocking chains

  • User names

  • Client machines

  • Programs (NAV client, Job Queue, etc.)


2️⃣ See Locked Objects (Tables)

SELECT resource_type, resource_associated_entity_id, request_mode, request_status FROM sys.dm_tran_locks;

Use this to identify:

  • Whether locks are at row, page, or table level

  • Which objects are locked


3️⃣ Find the Exact SQL Statement Causing the Lock

SELECT s.session_id, t.text FROM sys.dm_exec_requests r JOIN sys.dm_exec_sessions s ON r.session_id = s.session_id CROSS APPLY sys.dm_exec_sql_text(r.sql_handle) t WHERE r.blocking_session_id <> 0;

This is extremely useful when diagnosing custom code issues.


NAV-Specific Locking Patterns (Very Important)

Dynamics NAV has some unique behaviours that increase locking risk.

1️⃣ Table-Heavy Posting Routines

Posting processes often lock:

  • G/L Entry

  • Item Ledger Entry

  • Value Entry

  • Detailed Cust./Vendor Ledger Entry

These tables are high-contention tables, especially during month end.


2️⃣ Missing COMMIT Statements

In custom C/AL code:

  • Long transactions without COMMIT hold locks longer

  • This blocks other users unnecessarily


3️⃣ Reports Run During Business Hours

Reports like:

  • Adjust Cost – Item Entries

  • Post Inventory Cost to G/L

Should never run during peak usage.


4️⃣ Job Queue / NAS Locks

Background jobs running via NAS can:

  • Compete with users

  • Lock tables unexpectedly

  • Cause “system-wide slowdowns”

Proper scheduling is critical.


5️⃣ Upgrade & Customisation Issues

Older customisations:

  • May not follow modern locking best practices

  • Often cause blocking after upgrades


Best Practices to Reduce Locking

  • Schedule heavy jobs outside business hours

  • Review custom code for missing COMMITs

  • Avoid long-running reports during peak time

  • Monitor Job Queue activity

  • Educate users about month-end load


Summary

Locking in Dynamics NAV is normal—but uncontrolled locking is avoidable.

By:

  • Understanding how SQL Server locking works

  • Using the right diagnostic tools

  • Knowing NAV-specific behaviour

You can resolve issues quickly and prevent them from recurring.

Saturday, May 19, 2018

Upgrading the Data to Microsoft Dynamics NAV 2018



Applies to: Microsoft Dynamics NAV 2018. See Microsoft Dynamics NAV 2017 version.
This topic describes the tasks required for upgrading the following database versions to Microsoft Dynamics NAV 2018:
  • Microsoft Dynamics NAV 2013
  • Microsoft Dynamics NAV 2013 R2
  • Microsoft Dynamics NAV 2015
  • Microsoft Dynamics NAV 2016
  • Microsoft Dynamics NAV 2017
You use data conversion tools provided with Microsoft Dynamics NAV 2018 to convert the old data with the old version’s table and field structure, so that it functions together with the new version’s table and field structure. Mainly, only table objects and table data are modified during the data upgrade process. Other objects, such as pages, reports, codeunits, and XMLports are upgraded as part of the application code upgrade process.
The data upgrade process described in this article leads you through the database conversion (technical upgrade) and then the upgrade of the actual data, which is achieved by using the upgrade toolkit/upgrade codeunits.

Prerequisites

Before you start the upgrade tasks, make sure you meet the following prerequisites:
  1. Your computer uses the same codepage as the data that will be upgraded.
    If you use conflicting codepages, some characters will not display in captions, and you might not be able to access the upgraded database. This is because Dynamics NAV must remove incorrect metadata characters to complete the data upgrade. In this case, after upgrade, you must open the database in the development environment on a computer with the relevant codepage and compile all objects. This adds the missing characters again.
    Optionally, you can export the captions before the upgrade. For more information, see How to: Add Translated Strings for Conflicting Text Encoding Formats.
  2. You have a FOB file(s) that contains the upgraded application code and upgrade toolkit. The upgrade toolkit includes upgrade codeunits for handling the data upgrade. The upgrade toolkit can be in the same FOB file as the application code or in a separate FOB file.
    For more information about upgrading the application code, see Upgrading the Application Code.
    You can find the default upgrade toolkit objects in the UpgradeToolKit\Data Conversion Tools folder on the Microsoft Dynamics NAV 2018 installation media (DVD). Choose the FOB that matches the Dynamics NAV version from which you are upgrading:
    VersionFOBRemarks
    Microsoft Dynamics NAV 2013Upgrade7001100.FOBThis file can be found on the Microsoft Dynamics NAV 2018 Cumulative Update 2 installation media (DVD). It is not available with later cumulative updates.
    Microsoft Dynamics NAV 2013 R2Upgrade7101100.FOB and Upgrade710HF1100.FOBThis file can be found on the Microsoft Dynamics NAV 2018 Cumulative Update 2 installation media (DVD). It is not available with later cumulative updates.
    Microsoft Dynamics NAV 2015Upgrade8001100.FOB
    Microsoft Dynamics NAV 2016Upgrade9001100.FOB
    Microsoft Dynamics NAV 2017Upgrade10001100.FOB
  3. You have exported the permission sets and permissions as XML files.
  4. (Optional) Make a copy of the web.config file for all Dynamics NAV Web Server instances for the Microsoft Dynamics NAV Web client. With Microsoft Dynamics NAV 2018, Dynamics NAV Web Server instances run on Microsoft .NET Core. With this change, the instances now use a .json type file (called navsettings.json) instead of the web.config file.
  5. (Optional) If the old Dynamics NAV application uses data encryption, you exported the encryption key file that it used for the data encryption.
    For more information, see How to: Export and Import Encryption Keys.
Note
If the old Dynamics NAV application uses Payment Services for Microsoft Dynamics ERP, be aware that this was discontinued in Microsoft Dynamics NAV 2017. This means that most of the objects that are associated with this feature will be deleted during the upgrade. Some objects you will have to manually delete.

Task 1: Prepare the old database

  1. Use the Microsoft Dynamics NAV Development Environment that matches the old database to build all application objects.
    For more information, see How to: Build Server Application Objects.
  2. Unlock all application objects.
    For more information, see How to: Unlock an Object.
  3. Synchronize the database schema by using the development environment or Dynamics NAV Administration Shell that matches the old database.
  4. (Microsoft Dynamics NAV 2016 and earlier only) If the old database includes test runner codeunits, modify the signature of the OnBeforeTestRun and OnAfterTestRun triggers of the test runner codeunits to include the TestPermission parameter
    The triggers for codeunit 130400 CAL Test Runner and 130402 CAL Command Line Test Runner will be updated for you during the data upgrade.

Task 2: Create a full SQL backup of the old database on SQL Server

You must create a full backup of the old database in the SQL Server. Alternatively, you can make a copy of the old database and perform the upgrade tasks on the copy.
For more information, see Create a Full Database Backup (SQL Server).

Task 3 Uninstall all V1 extensions in old database

Open the Microsoft Dynamics NAV Administration Shell that matches to old database, and run these commands:
  1. To get a list of the V1 extensions that are installed, run this command:
    Get-NAVAppInfo -ServerInstance  -Tenant  |ft
    
    Replace  with the name of the Microsoft Dynamics NAV Server instance that the database connects to. Replace  with the tenant ID of the database. If you do not have a multitenant server instance, use default.
    In the table that appears, V1 extensions are indicated by CSIDE in the Extension Type column.
    Make a note of the V1 extensions that you will uninstall because you will reinstall these later, after you upgrade the database.
  2. For each Extension V1, run this command to uninstall it:
    Uninstall-NAVApp -ServerInstance  -Name  -Version 
    
    Replace  and  with the name and version of the Extension V1 as it appeared in the previous step.
    Important
    Do not uninstall V2 extensions (ModernDev type).

Task 4: Upload the Microsoft Dynamics NAV 2018 license to the old database

By using the Microsoft Dynamics NAV Development Environment that matches the old database, upload the Microsoft Dynamics NAV 2018 license to the database.

Task 5: Delete all objects except tables from the old database

In the development environment version that matches the database, open the old database, open Object Designer, select all objects except tables, and then choose Delete.
You can also use the DeleteObjects command of the finsql.exe.

Task 6: Uninstall (optional) the old product and install the new product

Uninstall the old Dynamics NAV, and then install Microsoft Dynamics NAV 2018.
As a minimum, you must install the following Microsoft Dynamics NAV 2018 components: Client (with the Development Environment), Modern Development Environment, Administration Tools, Server, and SQL Server Components. You can install these components by choosing the Custom option during Setup. For more information, see Custom Option.

Task 7: Clear Dynamics NAV Server instance records from old database

Clear all Microsoft Dynamics NAV Server instance records from the dbo.Server Instance table in the database in SQL Server.
  1. If you did not uninstall the old Dynamics NAV, make sure that you stop the old Microsoft Dynamics NAV Server instance, and close any tools that connect to the database, such as the Dynamics NAV Administration Tool and development environment.
  2. Using SQL Server Management Studio, open and clear the dbo.Server Instance table of the old database. For example, you can run the following SQL query:
    DELETE FROM [My NAV Database Name].[dbo].[Server Instance]
    

Task 8: Convert the old database to the Microsoft Dynamics NAV 2018 format

If the database is on Azure SQL Database, you must first add your user account to the dbmanager database role on master database. This membership is only required for converting the database, and can be removed afterwards.
To convert the old database to the Microsoft Dynamics NAV 2018 format, open the old database in the Microsoft Dynamics NAV 2018 development environment, and follow the conversion instructions.
Important
Do not run schema synchronization at this time.

Task 9: Import the upgraded application objects and upgrade toolkit objects into the converted database

Using the Microsoft Dynamics NAV 2018 development environment, import the application objects that you want in the Microsoft Dynamics NAV 2018 database. This includes the application objects FOB file (from the application code upgrade) and the upgrade toolkit objects FOB file.
  1. Import the application objects FOB file first, and then import the upgrade toolkit FOB file.
    For more information, see How to: Import Objects.
  2. When you import the FOB file, if you experience metadata conflicts, the Import Worksheet windows appears.
    Review the Worksheet page. For more information, see Import Worksheet.
    Choose Replace All to continue.
  3. IMPORTANT When prompted about table synchronization, set the Synchronize Schema option to Later.

Task 10: Connect a Microsoft Dynamics NAV 2018 Server instance to the converted database

You use the Microsoft Dynamics NAV Server Administration tool for Microsoft Dynamics NAV 2018 or Set-NAVServerConfiguration cmdlet in the Microsoft Dynamics NAV Administration Shell to connect a Microsoft Dynamics NAV Server instance to the converted database.
The service account that is used by the Microsoft Dynamics NAV Server instance must be a member of the db_ownerrole in the Dynamics NAV database on SQL Server or Azure SQL Database.
Important
When upgrading a large database, you should increase the SQL Command Timeout setting for the Microsoft Dynamics NAV Server instance, to avoid timeouts during schema synchronization. The default setting is 30 minutes.

Task 11: Compile all objects that are not already compiled

  1. In the development environment, set it to use the Microsoft Dynamics NAV Server instance that connects to the database.
  2. Use the development environment or finsql.exe to compile all objects that are not already compiled. This includes the imported application objects, data tables, and system tables.
    Important
    Choose to run schema synchronization later. For example, in Object Designer, choose Tools, choose Compile, set the Synchronize Schema option to Later, and then choose OK. For more information, see Compiling Objects.
  3. (Microsoft Dynamics NAV 2016 and earlier only) If you get errors on the following table objects, use the Object Designer to delete the objects because they are no longer used.
    • Table 470 Job Queue (replaced by the Task Scheduler)
    • Table 824 DO Payment Connection Details
    • Table 825 DO Payment Connection Setup
    • Table 827 DO Payment Credit Card
    • Table 828 DO Payment Credit Card Number
    • Table 829 DO Payment Trans. Log Entry
    • Table 1510 Notification Template
      When you delete a table object, in the Delete confirmation dialog box, set the Synchronize Schemaoption to Force. Important At this point, it is very important that you do not use the Sync. Schema For All Tables option from the Tools menu.

Task 12: Recompile published extensions

Use the Repair-NAVApp cmdlet of the Microsoft Dynamics NAV 2018 Administration Shell to compile the published extensions to make sure they are work with the new platform and application.
For example, you can run the following command to recompile all extensions:
Get-NAVAppInfo -ServerInstance  | Repair-NAVApp

Task 13: Run the schema synchronization on the imported objects

Synchronize the database schema with validation. You can run the schema synchronization from the Microsoft Dynamics NAV Development Environment or Microsoft Dynamics NAV Administration Shell.

Task 14: Run the data upgrade process

A data upgrade runs the upgrade toolkit objects, such as upgrade codeunits and upgrade tables, to migrate business data from the old table structure to the new table structure. You can start the data upgrade from the Microsoft Dynamics NAV Development Environment or Microsoft Dynamics NAV Administration Shell.
Note
In the last phase of data upgrade, all companies will be initialized by running codeunit 2 Company Initialization. This is done automatically. If you want to skip company initialization, then use the Start-NavDataUpgrade cmdlet and set the -SkipCompanyIntitialization parameter.
From the development environment:
Open development environment as an administrator. On the Tools menu, choose Data Upgrade, and then choose Start and follow the instructions.
To view the progress of the data upgrade, on the Tools menu, choose Data Upgrade, and then choose Show Progress.
From the Microsoft Dynamics NAV Administration Shell:
Open the Microsoft Dynamics NAV Administration Shell as an administrator, and then run Start-NavDataUpgrade cmdlet as follows:
Start-NavDataUpgrade -ServerInstance  -Force  
Replace  with the name of the Microsoft Dynamics NAV Server instance that is connected to the database.
To view the progress of the data upgrade, you can run Get-NavDataUpgrade cmdlet with the –Progress switch.
The data upgrade process runs CheckPreconditions and Upgrade functions in the upgrade codeunits. If any of the preconditions are not met or an upgrade function fails, you must correct the error and resume the data upgrade process. If CheckPreconditions and Upgrade functions are executed successfully, codeunit 2 is automatically run to initialize all companies in the database unless you set the -SkipCompanyIntitialization parameter.

Task 15: Import upgraded permission sets and permissions by using the Roles and Permissions XMLports

You import the permission sets and permissions XML files.
  1. Delete all permission sets in the database except the SUPER permission set.
    In Object Designer, run page 9802 Permission Sets, and then delete the permission sets.
  2. Run XMLport 9171 and XMLport 9172 to import the permission sets and permission XML files.

Task 16: Set the language of the customer database

In the development environment, choose Tools, choose Language, and then select the language of the original customer database.

Task 17: Register client control add-ins

The database is now fully upgraded and is ready for use. However, Microsoft Dynamics NAV 2018 includes the following client control add-ins.
  • Microsoft.Dynamics.Nav.Client.BusinessChart
  • Microsoft.Dynamics.Nav.Client.DynamicsOnlineConnect
  • Microsoft.Dynamics.Nav.Client.FlowIntegration
  • Microsoft.Dynamics.Nav.Client.OAuthIntegration
  • Microsoft.Dynamics.Nav.Client.PageReady
  • Microsoft.Dynamics.Nav.Client.PingPong
  • Microsoft.Dynamics.Nav.Client.SocialListening
  • Microsoft.Dynamics.Nav.Client.TimelineVisualization
  • Microsoft.Dynamics.Nav.Client.VideoPlayer
  • Microsoft.Dynamics.Nav.Client.WebPageViewer
To use these add-ins, they must be registered in table 2000000069 Client Add-in. Depending on the version that you upgraded from, all the add-ins might not be registered after the upgrade process. You can register missing control add-ins in the Control Add-ins page in the Microsoft Dynamics NAV Windows client. The assemblies (.dlls) for these add-ins are located in subfolders to the Add-ins folder of the Dynamics NAV Server installation, which by default is C:\Program Files\Microsoft Dynamics NAV\110\Service\Add-ins. For more information, see How to: Register a Windows Client Control Add-in.

Task 18: Publish and install/upgrade extensions

Microsoft Dynamics NAV 2018 includes a number of extensions that you publish and install as part of the upgrade process. To enable these extensions, it is important that you follow the steps below.
  1. Download the system and test symbols file from the ModernDev folder on the DVD, and make a note of the path where you store the files.
    Note
    If you are upgrading to Microsoft Dynamics NAV 2018 RTM, the symbols are not included on the DVD, and you must download them here: system symbols, test symbols, and application symbols.
    If you are upgrading to Microsoft Dynamics NAV 2018 CU1, or higher, please use the symbols that you find in the ModernDev folder on the cumulative update DVD.
  2. Publish the platform symbols and the test symbols one file at a time to the Dynamics NAV server instance:
    Open the Microsoft Dynamics NAV Administration Shell as an administrator, and run the following command for each of the symbol files:
    Publish-NAVApp -ServerInstance  -Path  -PackageType SymbolsOnly
    
    Note
    If you are upgrading to Microsoft Dynamics NAV 2018 RTM, you must also publish the application symbol file.
  3. Make sure that Enable loading application symbol references at server startup(EnableSymbolLoadingAtServerStartup) is set on the Dynamics NAV server instance.
    For more information, see Configuring Dynamics NAV Server.
  4. Generate the application symbol references:
    1. Open a command prompt, change to the directory where the finsql.exe file has been installed as part of Microsoft Dynamics NAV 2018, and then run the following command:
      finsql.exe Command=generatesymbolreference, Database=, ServerName=\
      
      Replace values for the Database and ServerName settings to suit.
      Note
      This command does not generate a file. It populates the Object Metadata table in the database.
    2. When you run the command, the console returns to an empty command prompt, and does not display or provide any indication about the status of the run. However, the finsql.exe may still be running in the background. It can take several minutes for the run to complete, and the symbols will not be generated until such time. You can see whether the finsql.exe is still running by using Task Manager, and looking on the Details tab for finsql.exe.
      When the process ends, a file named navcommandresult.txt is saved to the Microsoft Dynamics NAV Windows client installation folder. If the command succeeded, the file will contain text like [0] [06/12/17 14:36:17] The command completed successfully in '177' seconds. If the command failed, another file named naverrorlog.txt will be generated. This file contains details about the error(s) that occurred.
      For more information about generation symbols, see Running C/SIDE and AL Side-by-Side.
  5. Publish all the extensions from the \Extensions folder of the Microsoft Dynamics NAV 2018 installation media (DVD):
    1. From the Microsoft Dynamics NAV Administration Shell, run the following command for each extension.
      Publish-NAVApp -ServerInstance  -Path  
      
      V1 extensions have the file type .navx. V2 extensions have the file type .app.
    2. For each Extension V2, run the following command to synchronize its schema with the tenant database:
      Sync-NAVApp -ServerInstance  -Name  -Version 
      
      For more information about publishing extensions, see How to: Publish and Install an Extension.
  6. Upgrade the V1 extensions that you uninstalled previously in Task 3 by reinstalling them. From the Microsoft Dynamics NAV Administration Shell, run the following commands:
    1. To get a list of the published extensions on the server instance, run this command:
      Get-NAVAppInfo -ServerInstance 
      
    2. To determine which V1 extensions to install, inspect the list that appears, and compare it with the list that you gathered in Task 3. V1 extensions are indicated by Extension Type : CSIDE. If there is a newer version of an Extension V1, you should install the newer version.
    3. For each Extension V1 that you want to install, run this command:
      Install-NAVApp -ServerInstance  -Name  -Version  –Tenant 
      
      Replace  and  with the name and version of the Extension V1 as it appeared in the previous step. For , in single-tenant deployments, you either specify defaultor you omit the –Tenant parameter.
      This will upgrade the V1 extensions.
  7. Upgrade V2 extensions that are currently installed:
    1. To get a list of the installed V2 extensions, run this command:
      Get-NAVAppInfo -ServerInstance  -Tenant 
      
      Replace  with the name of the Microsoft Dynamics NAV Server instance that the database connects to. Replace  with the tenant ID of the database. If you do not have a multitenant server instance, use default.
      V2 extensions are indicated by Extension Type : ModernDev.
    2. For each Extension V2 that you want to upgrade, run these commands:
      Sync-NAVApp -ServerInstance  -Name  -Version 
      Start-NAVAppDataUpgrade -ServerInstance DynamicsNAV -Name ProswareStuff -Version 
      
      This will upgrade the V2 extensions.
  8. For the Denmark (DK) local version of Microsoft Dynamics NAV 2018, you must install the following new V2 extensions in order to get all the local functionality.
    NamePublisherVersion
    Payroll Data Import Definitions (DK)Microsoft1.0.19502.0 (or later)
    Payment and Reconciliation Formats (DK)Microsoft1.0.19502.0 (or later)
    Tax File Formats (DK)Microsoft1.0.19502.0 (or later)
    For each Extension V2, run this command:
     ```
     Install-NAVApp -ServerInstance  -Name  -Version  
     ```
    

Task 19: Update the Dynamics NAV Web client configuration file (navsettings.json)

If you have installed the Microsoft Dynamics NAV Web Server components, populate the navsettings.json file for the Dynamics NAV Web Server instance with the settings of the old web.config file.

Task 20: Delete the upgrade objects

At this point, you have upgraded the database to Microsoft Dynamics NAV 2018. Now, you can delete the upgrade codeunits and upgrade table objects that you imported in task 9. This task is recommended but not required.
When you delete tables, on the Delete dialog box, set the Synchronize Schema option to Force.

See Also

Source:


Business Central SaaS Extension Design: Implementing Plant Tracking with AL Event Subscribers

  Extending Business Central SaaS: Plant Tracking Using AL Extensions  1️⃣ Problem Statement In many manufacturing and service-oriented or...