Skip to main content

Application Merge Utilities - How to Use - Merge NAVApplicationObject.

Hi All,

This is Sixth & Last Post in this series. If you would like to read earlier post please visit Index of Application Merge Utilities.

As Promised In This Post we will see about Last Commands Available in the the Module "Microsoft.Dynamics.Nav.Model.Tools".

1. Merge-NAVApplicationObject.

Let's Load the Module again and see the Available Functions.
Import-Module "${env:ProgramFiles(x86)}\Microsoft Dynamics NAV\71\RoleTailored Client\Microsoft.Dynamics.Nav.Model.Tools.psd1" -force
Get-Help "NAV"

For the Post i Need Two Files To Compare and a Third File to Apply the Result of Comparison.
So These are my Three Files -

I Will Compare these Two - 
NAV2013 R2 W1 All Objects Initial Set (NO Cumulative Update).
NAV2013 R2 W1 All Objects with Cumulative Update 12.

And Then Compare the Target File - 
NAV2013 R2 IN All Objects Initial Set (NO Cumulative Update).

Finally will Merge Changes Found in Comparison to a New File. (Blank File Initially)

What i want to achieve with this exercise is -
Merging of Changes From W1 Latest Cumulative Update to Indian Standard Database with single command.

1. Merge-NAVApplicationObject -

This cmdlet will Compares the changes that have been made to application objects between two versions of Microsoft Dynamics NAV, and applies the difference to a third set of application objects. The result of the merge is a number of text files with the merged application objects. Any conflicts that the cmdlet cannot merge are identified in conflict files.

Below are the files that i will use for the Demo -

This Cmdlet have Following Input Parameter -

  • Original - Specifies the application objects that are the baseline of the file comparison.
  • ** Demo Orignal File - NAV 2013 R2 W1 

  • Modified - Specifies the application objects that you want to compare to the original version.
  • ** Demo Modified File - NAV 2013 R2 W1 With CU 12

  • Target - Specifies the application objects that the difference between the original version and the modified version must be applied to. 
  • ** Demo Target File - NAV 2013 R2 IN

  • Result - Specifies the folder where the result of the merge between the two versions of application objects must be put.
  • ** Demo Result File - Blank File

  • DateTimeProperty - Specifies the value of the Date and Time properties for the merged application objects. 
  • DocumentationConflict - Specifies how conflicting lines in documentation triggers are merged.
  • ModifiedProperty - Specifies the value of the Modified property for the merged application objects.
  • VersionListProperty - Specifies if you want to update the Version List property for the application objects.

  • Force - Forces the cmdlet to overwrite any existing files in the Delta folder.
  • Legacy - Reduces the scope of the cmdlet. Do not set this parameter.
  • Strict - By default conflicting modifications on non-functional incidents are suppressed by the cmdlet to reduce "noise". Examples are ordering of variables and methods.
  • NoCodeCompression - Specifies if the files that are the result of the comparison must not be compressed.
  • PassThru - Specifies if the cmdlet must return a FileInfo object for each .delta file that is created by the comparison. If you do not set this parameter, the cmdlet returns a list of the files.

Merge-NAVApplicationObject -Modified C:\Temp\NAV_2013_R2_W1_With_Rollup_12.txt -Original C:\Temp\NAV_2013_R2_W1.txt -Result C:\Temp\Result.txt -Target C:\Temp\NAV_2013_R2_IN.txt -Confirm -DateTimeProperty FromTarget -DocumentationConflict ModifiedFirst -Force -ModifiedProperty Yes -VersionListProperty FromModified

Below is the Cmdlet window.

Here is the processing happing when i run the commandlet.

It Reads all three files and then compare and merge the changes into a new Text File. In My Case the New File is called as Result.txt.

Here is the output of the Cmdlet -

Now Let's Open the folder and see the Confilcts.

So now instead of taking care of all the objects that have been modified in W1 In Cumulative Update 12, i need to take care of only 67 Objects which have conflict. The tool was able to merge 472 Objects automatically.

The Conflict resolution can be done in same way as discussed in previous post or Manually comparing only conflict objects.

With the Cmdlet, my 84 % Task was done automatically in few minutes.

Thank you Microsoft Development Team for such an effective tool.
I have also tested the Merge NAVApplication Object Cmdlet in earlier version like 4.03 and 2013 Sp1 and it still work charm for the supported objects.

Yes in Pre-NAV2013 Version the Confict list is more but still this tool seems to worth to be used during upgrade projects and will suerly reduces the cost & time spent on a upgrade project.

-- Make sure that files that you will be using as Standard, Modified & Target are Exact.
-- Make sure if the modified file contain some Localization fixes, your Source file should also contain them.
-- Other Partner Verticals (If Exist in Database) can be merged but cannot be imported. Licence issue.
-- If Used in a Upgrade for Version before 2013, do remember to exclude discontinued Objects. (Dimensions).

I hope we all can use it and reduce effort as partner and reduce cost for customer.

Stay Tuned for More.

Let me know your views about the cmdlets discussed in series of post as comments to article.

Saurav Dhyani


Popular posts from this blog

Send Mail with Attachment From Navision.

Hi all, We have seen how to save a report into PDF and how to send mail to a customer. Let's link these two post in one i.e. Mailing statement to a customer into PDF Format. This article is part of the Series. Please Refer  Table of Content here . If you have the old objects set let me brief you what I will be changing - 

MSDYN365BC - Data Upgrade To Microsoft Dynamics 365 Business Central on premises.

Hi Readers, We have already talked about the number of steps for upgrading to Business Central on Premises from different NAV versions. After that article, I received multiple requests for an article which list down steps for Data Migration. In this article, we will discuss steps of data migration to MSDYN365BC (on-Prem) from NAV 2017. For this article, I am considering a Cronus Demo Database without any customization. For an actual upgrade project, we will have to complete object merge using compare and Merge process. After the Merge Process, the next step is data migration. Let's discuss those steps. Direct Upgrade to Microsoft Dynamics 365 Business Central (on-Prem) is from following versions - 1. NAV 2015. 2. NAV 2016. 3. NAV 2017. 4. NAV 2018.

BC 21 and Higher - PowerShell Cmdlet (Replacement of Business Central Administration).

Hi Readers, As discussed in last article about deprecating of Business Central Administration, there are few common actions that we use in administration till Business Central 20. For our on-prem customers, we will still require doing activities. As Microsoft suggest we need to start using PowerShell cmdlet.    Let's see how to do those via PowerShell, or Administration Shell. I will be keep adding commands as you comment to this article.