There is a number of posts and articles that show what you can really achieve with Client Extensibility in NAV 2009 SP1. This post goes the exact opposite way, to show the simplest possible example of a Client Extensibility add-in which includes callbacks between RTC and the Add-In, both ways:
In Visual Studio, add references to Microsoft.Dynamics.Framework.UI.Extensibility, System.Windows.Forms and (just to add colours) System.Drawing.
To add the first one, browse for "Microsoft.Dynamics.Framework.UI.Extensibility.dll" which is in the RTC folder. The other references used here are both under ".NET":
Then you need to sign the project. In Visual Studio 2008, under Project Properties, go to the Signing tab, tick "Sign the Assembly", and create a new key (type anything as the key name).
And here is the code needed to create a simple add-in, in this example just a button:
Finally build the project. Copy your new dll and pdb file into the add-ins sub folder of RTC. Use the syntax sn -T [MyNewDll] from a Visual Studio command prompt to get the Public key token from your new dll. Register it in table 2000000069 "Client Add-in" with its name and Public key token, then add it to a page. To send data to the add-in, you also need to specify the "SourceExpr"-property. This can be either a variable or a field. In this case, it will just display the source expression on the button.
For the purpose of keeping this post minimal, I won't go into any further details here, but I will mention one thing: I found that this line:
is important. It seems that some times, the page calls the add-in multiple times, and some times with a blank value. So if not testing that RTC has actually sent some data to the add-in, you may be overwriting with blank data, and you may spend time to work out why this part is not working.
Microsoft Dynamics UK
Microsoft Customer Service and Support (CSS) EMEA
I understand that
do you have this file to download?
i little bit confused