Update (11. Aug 2010): Updated registration tool for Add-ins libraries that reside in other directories than the RTC Add-ins folder.(You must install this into the directory of the RoleTailored client !!!)
(Please note: “Add-ins” are supported with SP1 for Dynamics NAV 2009.)
In my last blog post on “Add-ins” for the RoleTailored client of Dynamics NAV 2009 I have shown a very simple Add-in – no support data binding, no events. But already this one requires proper registration in the database, before it can be used for development and at runtime in your Dynamics NAV business application.
Before going into further samples for Client Extensibility with data binding and events I think it is a good idea to explain the concept of this registration in a little more detail. And even better: provide a tool for point-and-click registration for Add-ins.
Add-in registration basics
The registration tool
This was the name thas had been specified as the parameter to the ControlAddIn Attribute. In this sample “SampleControl_InkEdit”.
[ControlAddInExport("SampleControl_InkEdit")]public interface IMyInkEditControlAddInDefinition : IObjectControlAddInDefinition{ }[ControlAddInExport]public class MyInkEditContolAddIn : WinFormsControlAddInBase, IMyInkEditControlAddInDefinition{...}
[ControlAddInExport("SampleControl_InkEdit")][Description("Edit and displays TabletPC ink")]public class MyInkEditContolAddIn : WinFormsControlAddInBase, IObjectControlAddInDefinition{...}
sn.exe -T <assembly> is the answer to this.
The assembly version of the dll file an Add-ins can be found is optional information. This will be very useful, as soon as several versions of Add-ins exist and need to be supported in the same NAV installation.
Now, this information is again optional and only useful for the developer for a better understand what a certain Add-in in the table is good for. At runtime this description is not used at all.
But where is it specified?
If an Add-in developer wants to manifest a description together with his Add-in implementation, the Description attribute is the right choice - as in the sample code below:
The Add-in registration tool adds point-and-click registration to the classic client. Is is composed out of a COM object that executes the assembly analysis Form 10000 which represents the user interface below. Codeunit 10000 is used internally to executes the COM object and update relevant registrations in the Client Add-in table.
You can download the Registration tool here (ver 1.1, with support for Add-ins in other directories)(You must install this into the directory of the RoleTailored client !!!)
I hope this is somewhat helpful to you.
Christian Abeln Senior Program Manager Microsoft Dynamics NAV