This project is read-only.
NOW INCLUDING TFSBuild TEMPLATE AND SCRIPTS FOR GIT REPOS ON TFS 2013!
TFS Build Template

Pre-requisites
MS SQL, Powershell, MS Dynamics NAV 2013 R2 with CU9 at least (client and server to be able to use NAV cmdlets). Access rights for the SQL server.

Merge-NAVGIT
Allows developers to merge objects stored in GIT repository using the powershell scripts available for NAV 2013 R2 (released in CU9).

This project should help everyone to setup and use GIT as source code repository for NAV.

Compile-NAVTxt2Fob
Script automatically create NAV Db, NAV Server Instance, import FOB file as base objects, import TXT files to compile, compile the objects and than it exports all the objects into FOB file. This script could be used to automatically create FOB files after you merge the objects with Merge-NAVGIT or in any other way.

Since 2.3.2015 using the multi-CPU compilation function to use all available CPUs for compilation.

Update-NAVApplicationFromTxt
Script updates NAV Database from txt files. Script imports only files with objects which differs from the one in database (compared are version list, modified, date, time). Objects could be compiled if needed. Scripts display (or mark) objects which should be deleted from the database (because there are no such an objects in files). This deletion cannot be automated for now (no way, only "hard delete from SQL" possible).

Example:
.\Update-NAVApplicationFromTxt.ps1 -Files E:\git\NAV\Objects\*.txt -Server MySQLServer -Database MyNavDatabase


Update-NAVTxtFromApplication
Script updates txt files from NAV Application. Script exports only files with objects which differs from the one on disk (compared are version list, modified, date, time). Scripts display (or delete) objects which should be deleted from disk (because there are no such an object in database). This script is same like Update-NAVApplicationFromTxt but in opposite direction.

Example:
.\Update-NAVTxtFromApplication.ps1 -Path E:\git\NAV\Objects\ -Server MySQLServer -Database MyNavDatabase

Export-NAVProfileCaptionML
Reads Profile metadata table and return all CaptionML values included in the profiles.

Example:
Export-NAVProfileCaptionML.ps1 -Server localhost -Database mydb | Export-Csv -Path ToTranslate.csv

Translate-NAVProfileCaptionML
Reads profile metadata, and replace "value" in the CaptionML to "newvalue". The "value" and "newvalue" are read from the input stream (e.g. created by Export-NAVProfileCaptionML).

Example:
Import-Csv -Path TranslatedValues.csv | Translate-NAVProfileCaptionML.ps1 -Server localhost -Database mydb

Fix-NAVProfileTriggerNames
Reads the Profile Metadata and search for saved Trigger names. Check, if saved trigger name exists in the object metadata of the related page. If not, replace the wrong name in the profile with correct one and update the profile metadata. Good for correcting errors like "Method 'Page116.a60Action32a62a45OnAction' not found".

Example:
Fix-NAVProfileTriggerNames.ps1 -Server localhost -Database myNAVdb

NVR_NAVScripts
Includes functions usefull for different kind of things like exporting/importing txt files from NAV databases, compiling ...

CommonPSFunctions
Supporting functions like Get-MyEmail used in other scripts, which are usable regardless you are using NAV or anything else


Some parts of the scripts are based on work of Eric Wauters (Waldo), see http://www.waldo.be/tag/powershell/

Some parts are based on PowerShell scripts from module "Microsoft.Dynamics.Nav.Ide" made by Microsoft people.

Thanks!

Last edited Mar 2, 2015 at 11:56 AM by kine, version 8