Skip to content

Latest commit

 

History

History
36 lines (25 loc) · 3.72 KB

Merging-Application-Objects-using-the-Example-Scripts.md

File metadata and controls

36 lines (25 loc) · 3.72 KB
title ms.date ms.topic author
Merging application objects using the example scripts
12/22/2023
conceptual
jswymer

Merging application objects using the example scripts

The [!INCLUDEprod_short] product media includes a folder with examples of how you can use [!INCLUDEwps_2] cmdlets to compare and merge application objects. In the WindowsPowerShellScripts folder on the product media, the ApplicationMergeUtilities folder contains [!INCLUDEwps_2] sample scripts and folders that contain demonstration data.

You can run the sample scripts from the [!INCLUDEdevshell]. Alternatively, you can use the [!INCLUDEwps_2] Integrated Scripting Environment (ISE) as described in the following section.

The individual scripts provide different variations of how you can use the [!INCLUDEprod_short] cmdlets. For example, the HowTo-Merge-N-Conflicts-External-Tools.ps1 script shows different ways of displaying conflicts. By opening the scripts in the [!INCLUDEwps_2] ISE, you can examine the different variations and decide how you want to use the cmdlets to upgrade and maintain your own application.

Using the sample scripts in the [!INCLUDEwps_2] ISE

If you want to use the [!INCLUDEwps_2] ISE, you must import the Microsoft.Dynamics.Nav.Model.Tools.psd1 module. The module installs to the equivalent of [!INCLUDEprodx86installpath]\RoleTailored Client when you choose the Developer option in [!INCLUDEnav_setup].

For example, you can import the module into the [!INCLUDEwps_2] ISE by typing a command as follows:

Import-Module "${env:ProgramFiles(x86)}\Microsoft Dynamics 365 Business Central\140\RoleTailored Client\Microsoft.Dynamics.Nav.Model.Tools.psd1" -force  
  
Get-Help "NAV"  

Now you can see the Help for the cmdlets and take a closer look at the examples for how to use them.

The ApplicationMergeUtilities folder contains four subfolders that can help you start working with the scripts. The demonstration data in the ORIGINAL, MODIFIED, and TARGET folders illustrate the text files that are the input to the cmdlets. The demonstration data uses separate text files for each application object, but you can configure the text files in the way that works better for you. For example, you can use the Join-NAVApplicationObjectFile cmdlet to combine all the text files in the MODIFIED folder in a single file, for example, before you run the script.

The HowTo-Start-Import-NAV-Module.ps1 script imports the Microsoft.Dynamics.Nav.Model.Tools.psd1 module into the [!INCLUDEwps_2] ISE. The __Run-Application-Merge-Utilities.ps1 and __Reset-HowTo-Sample.ps1 scripts enable you to run the sample scripts repeatedly.

For Help for a [!INCLUDEprod_short] cmdlet, type Get-Help <cmd name>. For Help for the [!INCLUDEwps_2] ISE, select F1, or choose the Help menu, and then choose [!INCLUDEwps_2] ISE Help.

See also

Business Central PowerShell Cmdlets
Merge Application Changes
Comparing and Merging Application Object Source Files