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 8
source files. This version of the object will serve as a base for comparison. - Create a folder
MergeObjects
and 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
GetCityByPostCode
as follows:PostCodeCatalog.SETRANGE(Code,PostCode); IF PostCodeCatalog.FINDFIRST THEN EXIT(PostCodeCatalog.City);
- Save the codeunit and export it to the same
MergeObjects
folder asCOD50800_Target.txt...