How we can Import and Compile Merged Objects in an Empty Database in NAV 2018?

Network of MS Dynamics D365, AX, NAV, GP, SL, CRM, RMS, POS professionals Forums Microsoft Dynamics NAV / Navision NAV Consulting and Configuration How we can Import and Compile Merged Objects in an Empty Database in NAV 2018?

Tagged: 

This topic contains 2 replies, has 3 voices, and was last updated by  Locus IT 6 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #21038

    Locus IT
    Participant

    Hi Jacobs,

    After you have completed the merge, you import the new merged application objects as text files into a new (empty) database and then compile all objects. You must resolve any compilation errors before you can continue. The text files include successfully merged code, and code that is partially merged. You can import the partially merged objects into the Microsoft Dynamics NAV 2018 development environment and resolve the conflicts there.

    1. Create a new Microsoft Dynamics NAV 2018 database for the newly upgraded application. The database should be empty, except for the system tables.

      For example, give the database the name My Upgraded App.

    2. Make sure the database includes a valid Microsoft Dynamics NAV 2018 license.
    3. Import the new merged application object text files (.TXT) from the Result folder into the new database.

    There are three ways to import the files:

      • Use the Microsoft Dynamics NAV 2018 development environment.
      • Use the finsql.exe to run the ImportObjects command.
      • Use the Microsoft Dynamics NAV Development Shell (or Microsoft.Dynamics.NAV.Model.Tools.psd1 module).

    The shell includes the Join-NAVApplicationObjectFile cmdlet and Import-NAVApplicationObject function. The Join-NAVApplicationObjectFile cmdlet combines multiple application object text files into one text file. The Import-NAVApplicationObject function runs the ImportObjects command to import an object file.

    This means that you can run a command similar to following to create a single text file from the merge application text files in the Result folder:

    Join-NAVApplicationObjectFile –Source C:\Upgrade\RESULT\*.txt -Destination C:\Upgrade\all-merged.txt   
    

    Then, you can run this command to import the text file:

    Import-NAVApplicationObject –DatabaseServer MyServer –DatabaseName "My Upgraded App" –Path C:\Upgrade\all-merged.txt  
    

    4. Connect a Microsoft Dynamics NAV 2018 Server instance to the database.

    You can do this with the Microsoft Dynamics NAV Server Administration tool or the Set-NAVServerConfiguration cmdlet in the Microsoft Dynamics NAV Administration Shell. In addition, you must add the service account that is used by the Microsoft Dynamics NAV Server instance as a member of the db_owner role in the Dynamics NAV database on SQL Server.

    5. Compile all the newly imported objects. To save time, it is recommended that you choose to run schema synchronization later when compiling the objects.

    You can use the development environment or finsql.exe.

    If you use the development environment, you will first have to set it to use the Microsoft Dynamics NAV Server instance that connects to the database.

    When you compile the objects, an error is thrown for each code conflict, and you can use the tools that are available in the development environment to resolve the conflicts.

    6. If not already done, run schema synchronization.

    You now have a new database with a fully upgraded application.

    #20707

    Chloe Jacobs
    Participant

    How we can Import and Compile Merged Objects in an Empty Database in Dynamics NAV 2018?

    #20710

    Lee Min
    Participant

    Hello Jacobs,

    Depending on the version of Microsoft Dynamics NAV that a database is being upgraded from, the amount of code changes between the two versions is large or small.
    To upgrade the application code, you must merge code from different versions of the application. This merge process is known as a code upgrade or application upgrade.

    You must upgrade the application before you upgrade the data.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Skip to toolbar