Exporting Nav object as text with C/AL code

Title say it all. I searched a way to export Nav object as text and only way I found is to call finsql.exe command with some arguments. I needed this functionnality to export independntly each object as text file for source code managment purpose.

Please note that this code can’t be used if the user calling it havn’t the development privilege/licence. This tool is for developer only (otherwise everyone could decompile entire Microsoft dynamics Nav base, I don’t think there are ok with that 🙂 )

This codeunit only need a DotNet var to call the finsql process and search into the Session record information about server name and database name.

 

Here is your download link (containing .txt and .fob 2017 version of the code unit) :

Codeunit 78000 Object Text Exporter Tool.zip

You can use it like this :
(FileFolder must be the full folder path with the last slash ending)

ExportObjectAsText(TxtPFileFolder, TxtPFileName, TxtPObjType, IntPObjID) // return if sucess or not

Regards

Leave a Reply

Your e-mail address will not be published. Required fields are marked *