Merging application objects
A dedicated set of PowerShell cmdlets in NAV Development Shell is available to aid in the tedious task of merging modifications in application objects. Application developers turn to this collection of cmdlets when applying modifications made by the Microsoft development center to customized objects.
How to do it...
The following recipe illustrates the benefits and limitations of automated object merge:
- Import the unchanged version of the codeunit 50800 from
Chapter 8source files. This version of the object will serve as a base for comparison. - Create a folder
MergeObjectsand copy the source file with the unchanged codeunit in the folder asCOD50800_Original.txt. - Open the codeunit 50800 in the object designer. Modify the function
GetCityByPostCodeas follows:PostCodeCatalog.SETRANGE(Code,PostCode); IF PostCodeCatalog.FINDFIRST THEN EXIT(PostCodeCatalog.City); - Save the codeunit and export it to the same
MergeObjectsfolder asCOD50800_Target.txt...