Hello guys,
I've been a NAV programmer for a long time but its the first time I ask for help on the forum.
My problem is the following,
I created a .Net dll based on framework 4.0, to extend excel buffer funcionality, and installed it with gacutil utilily on my system.
Then, created a console application to test my dll and everything ran ok.
Next step was to declare the DotNet variable in NAV 2013 and add my code. The object compiled with no problems,
but, when I run it, I get the message "Cannot instanciate the following .Net ....." on
"gNAVExcelDecorator := gNAVExcelDecorator.ClassNAVExcelDecorator(Decorator);" line.
So, my code is has follows,
fxSetBorder(VAR Decorator : DotNet "Microsoft.Dynamics.Nav.OpenXml.Spreadsheet.CellDecorator")
//TEMP
lDnetHexBinaryValue := lDnetHexBinaryValue.HexBinaryValue('#FFFF00');
Color := Color.Color;
Color.Rgb(lDnetHexBinaryValue);
Border := XlWrkShtWriter.DefaultCellDecorator.Border.CloneNode(TRUE);
Border.LeftBorder := XlWrkShtWriter.DefaultCellDecorator.Border.LeftBorder.CloneNode(TRUE);
Border.LeftBorder.Color := Color;
BorderStyle := BorderStyle.Medium;
Decorator.Border := Border;
CLEAR(gNAVExcelDecorator);
[b]gNAVExcelDecorator := gNAVExcelDecorator.ClassNAVExcelDecorator(Decorator);[/b]
gNAVExcelDecorator.fxSetLeftBorder(7); // 7 - Medium
Decorator := gNAVExcelDecorator.GetDecorator;
//TEMP
Also tried converting my dll to an add-in, but the result was the same.
I've cracked my head on this one, but can't find the answer for my problem.
Help me please, thanks in advance.
Comments
Otherwise I would guess that you have to change set your variable to run on client. (CTRL-F4/properties on the variable/object)
By the way, how do server side add-ins work? Where do you register them?