How to: Create an automation for usage in Navision

The development of a COM component with .Net for usage in Navision needs a special approach. Start with a new C# project, project type Class Library. Set the project to “Make assembly com-visible”. The simple automation provides a string property and a method to show a .net message box. // a sample code using System;… Continue reading How to: Create an automation for usage in Navision

Convert Tab delimited strings

I had an issue to process a csv file with TAB delimited text lines. The existing code expected text lines with ; as delimiter. Character TAB has ASCII Code 9. So i wrote following code: ConvertTabString(line : Text[250]) : Text[250] ch := 9; // of type Char line := CONVERTSTR(line,FORMAT(ch),’;’); exit(line); test code: // set… Continue reading Convert Tab delimited strings

How to display sum value in factbox on base of multiple line selection

Typical issue is to show a calculated value in a factbox on base of the currently selected line in a list page or the lines in a subpage. Is it possible to get a calculated value on base of more than one selected line? Let’s check out. Let’s say we want to display the sum… Continue reading How to display sum value in factbox on base of multiple line selection

Simple Read/Write Excel Data

In a Nav forum there was a question, how to read data from an excel document, change the data in Nav, write data back to the excel document without changing the existing cell formatting. With table ExcelBuffer and the helper assemblies delivered with Nav this cannot be done, because the Write functions e.g. SetCellValueText work… Continue reading Simple Read/Write Excel Data

Options in Report Request Page

This posting shows how to add option fields to a report’s request page. I developed a simple report on base of table Sales Header. To filter by field Posting Date you can simply add that field to report data item “Sales Header”‘s property ReqFilterFields, but in this sample we check out how to handle complex filter processing. Add… Continue reading Options in Report Request Page

Check License state of Objects

In Nav forums it’s quite often asked, how to check, if a object is within the current loaded license. There are some solutions for Nav 2009. I did not find a satisfying solution for newer Nav versions. So i’ve developed a “License Permission” Page, which lists Objects and their Permissions. Object IDs, which are not in the… Continue reading Check License state of Objects

Dotnet Events are not shown

There are 2 scenarios, where embedded events of .net (dotnet) assemblies can/should be displayed in the c/al code … or maybe not. Scenario 1: You use a control-addin like the PingPong Control-Addin (Microsoft.Dynamics.Nav.Client.PingPong). For usage it’s needed that a control-addin is listed in the Control-Addin Page. If so, you can select it from the list,… Continue reading Dotnet Events are not shown