When Dynamics NAV 2009 SP1 had been released with the possibility to host your own client controls in the metadata driven UI of the RoleTailored client, I heard the need from partner for tools that help with the firsts steps to create such an Add-in. I had released a number of templates for Visual Studio at that time.
Now I felt that it is time for an update. An Visual Studio Extension that can be managed with the the easy to use Extension Manager within Visual Studio.
You can download the Visual Studio templates for VS 2010 here. (Dynamics NAV 2009)The last version templates for previous version of Visual Studio are still available here. (Dynamics NAV 2009)
After the installation Visual Studio will offer you a few new Project and Item templates. The creation of a new Add-in is very easy. First select the project type based on the .NET client framework your Add-in control is built upon: WinForms or WPF.
Be sure to leave the Target Framework to highest 3.5. The .NET framework version 4.0 is not yet supported by the Dynamics NAV versions that we have shipped so far. (But it certainly will be in next release.)
Next step is to create an Add-in class, the factory for the .NET control you whish to host in the RTC. A view templates are provided, for the typical communication types. For example single value binding through the source expression of the field, string document binding, binary data binding, getting information from the Add-in context, etc.
Select to add a new item to your project and pick one of the Add-in templates from the Dynamics NAV category. You will find a short description for each Add-in template on the right side.
Next the Wizard will ask you to enter some basic information and then create the class for you in the VS project.
Please note the Help icon – it opens the API help for Add-ins in the RoleTailored client from MSDN. In the next step you will customize the Add-in class code which the wizard has created for you. This is pretty straight forward.
If you ever want to remove the templates, simply open the Extension manager I Visual Studio 2010 and identify the Template package and press “Uninstall”.
You can download the updated Visual Studio template here.
Christian Abeln Senior Program Manager Microsoft Dynamics NAV