In Microsoft Dynamics NAV 32-bit you can use any of the following versions:
/NET indicates the 32-bit edition of the /NET assembly version
The application built using /NET version runs on any Windows 32 or 64-bit machine.
In Microsoft Dynamics NAV 64-bit you can use any of the following versions:
/NET/64 indicates the 64-bit edition of the /NET assembly version
The application built using /NET/64 version runs on Windows 64-bit machine only. The application built using /NET/64 version cannot run on Windows 32-bit machine.
If you want to use your application on 32 and 64-bit machines, you can go for:
/NET/ANY indicates the 32 and 64-bit editions of the /NET assembly version
Extending Microsoft Dynamics NAV. A control add-in is a custom control, or visual element, for displaying and modifying data on pages in the Microsoft Dynamics NAV Windows client. Control add-ins are delivered as Microsoft .NET Framework?based assemblies. Microsoft Dynamics NAV includes the client extensibility API for creating your own control add-ins.
All of our /NET components can be used as Control add-ins in Microsoft Dynamics NAV.
In order to use the control on Microsoft Dynamics NAV, you need:
Microsoft Dynamics NAV
Microsoft Visual Studio
Source Code Version of the Exontrol Component /NET
Run the Microsoft Visual Studio and follow the next steps:
Open the source's solution ( for instance, "C:\Program
Files\Exontrol\ExG2antt.NET\Source\project\exg2antt\exg2antt.sln" )
Add the Microsoft.Dynamics.Framework.UI.Extensibility.dll reference to
the project ( for instance, "C:\Program Files\Microsoft Dynamics
NAV\80\Service\Add-ins\Microsoft.Dynamics.Framework.UI.Extensibility.dll"
)
Search the "public partial class" into entire solution to
locate the main component definition in the assembly, ( for instance,
"public partial class exg2antt : Control,
exontrol.DataSetProvider.IEBinderConsumer" )
By default, you will find something like:
[
Browsable(true),
ToolboxItem(true),
System.ComponentModel.ComplexBindingProperties("DataSource", "DataMember",
DefaultProperty("DataSource"
]
public partial class exg2antt : Control, exontrol.DataSetProvider.IEBinderConsumer
Add the ControlAddInExport attribute to the main class as
follows:
[
Browsable(true),
ToolboxItem(true),
System.ComponentModel.ComplexBindingProperties("DataSource", "DataMember",
DefaultProperty("DataSource",
Microsoft.Dynamics.Framework.UI.Extensibility.ControlAddInExport("exontrol.exg2antt")
]
public partial class exg2antt : Control, exontrol.DataSetProvider.IEBinderConsumer
Implement the IWinFormsControlAddIn interface:
Add the IWinFormsControlAddIn interface
[
Browsable(true),
ToolboxItem(true),
System.ComponentModel.ComplexBindingProperties("DataSource", "DataMember",
DefaultProperty("DataSource",
Microsoft.Dynamics.Framework.UI.Extensibility.ControlAddInExport("exontrol.exg2antt")
]
public partial class exg2antt : Control, exontrol.DataSetProvider.IEBinderConsumer,
Microsoft.Dynamics.Framework.UI.Extensibility.WinForms.IWinFormsControlAddIn
and its implementation such as:
#region Microsoft Dynamics NAV
void Microsoft.Dynamics.Framework.UI.Extensibility.IControlAddIn.Initialize(
Microsoft.Dynamics.Framework.UI.Extensibility.IControlAddInSite controlAddInSite)
{
RuntimeKey = "your runtime license key";
}
bool Microsoft.Dynamics.Framework.UI.Extensibility.WinForms.IWinFormsControlAddIn.AllowCaptionControl
{
get
{
return false;
}
}
System.Windows.Forms.Control Microsoft.Dynamics.Framework.UI.Extensibility.WinForms.IWinFormsControlAddIn.Control
{
get
{
return this;
}
}
#endregion Microsoft Dynamics NAV
where "your runtime license key" can be
found on the registration email once you purchased the component. The Initialize
method can be used to initialize the control, such as changing its visual
appearance, and so on. The GetType().Asssembly.Location
property gives the location where the assembly is loaded by the Microsoft
Dynamics NAV.
to specify a different height for the control-addin, and add two
columns: Column A and Column B.
Rebuild the entire solution, so no error occurs, and the exontrol.<component>.dll
is generated ( for instance "C:\Program
Files\Exontrol\ExG2antt.NET\Source\project\exg2antt\exg2antt\bin\Release\exontrol.exg2antt.dll"
)
Run the Microsoft Visual Studio and follow the next steps:
Open the source's solution ( for instance, "C:\Program
Files\Exontrol\ExG2antt.NET\Source\project\exg2antt\exg2antt.sln" )
Search the "public partial class" into entire solution to
locate the main component definition in the assembly, ( for instance,
"public partial class exg2antt : Control,
exontrol.DataSetProvider.IEBinderConsumer" )
Implement the IEventControlAddInDefinition interface:
Add the IEventControlAddInDefinition interface
[
Browsable(true),
ToolboxItem(true),
System.ComponentModel.ComplexBindingProperties("DataSource", "DataMember",
DefaultProperty("DataSource"),
Microsoft.Dynamics.Framework.UI.Extensibility.ControlAddInExport("exontrol.exg2antt"
]
public partial class exg2antt : Control, exontrol.DataSetProvider.IEBinderConsumer,
Microsoft.Dynamics.Framework.UI.Extensibility.WinForms.IWinFormsControlAddIn,
Microsoft.Dynamics.Framework.UI.Extensibility.IEventControlAddInDefinition
and its implementation such as:
#region Microsoft Dynamics NAV
public event Microsoft.Dynamics.Framework.UI.Extensibility.ControlAddInEventHandler ControlAddIn;
#endregion Microsoft Dynamics NAV
and so you have defined the ControlAddIn event/member that can be
fired/called any time you want to have a trigger on the NAV's page.
Call the ControlAddIn event/member. For instance, let's say we need to
trigger the Click event, so all we need is to look up for "DISPID_CLICK"
and you will find something like:
case -600: /*DISPID_CLICK - event Click () */
{
if (Click != null)
Click(this);
break;
}
and you need to replace with:
case -600: /*DISPID_CLICK - event Click () */
{
if (Click != null)
Click(this);
if (ControlAddIn != null)
ControlAddIn(-600, "Click");
break;
}
and so you trigger the ControlAddIn(-600,"Click") when user
clicks the Control-AddIn into the NAV's page.
Rebuild the entire solution, so no error occurs, and the exontrol.<component>.dll
is generated ( for instance "C:\Program
Files\Exontrol\ExG2antt.NET\Source\project\exg2antt\exg2antt\bin\Release\exontrol.exg2antt.dll"
)
On the computer running the RoleTailored client, copy the assemblies/files
that contain the control add-ins to the Add-ins folder of the RoleTailored
client installation.
By default, the path to this folder is C:\Program Files\Microsoft Dynamics
NAV\80\Service\Add-ins. You can also place assemblies in a subfolder of the
Add-ins folder. This can be useful when you have multiple assemblies and
dependencies.
Go To Microsoft Dynamics NAV's Add-ins folder and create a new folder
( for instance "Exontrol.ExG2antt" )
Copy the new generated dll ( for instance "C:\Program
Files\Exontrol\ExG2antt.NET\Source\project\exg2antt\exg2antt\bin\Release\exontrol.exg2antt.dll"
) , and any
reference the control may use. Also in the same folder you
can copy any EBN, XML files the control may use to change the visual
appearance. ( for instance "exontrol.exg2antt.dll" )
In case you are making changes to the assembly dll, and you replace
the DLL in the NAV's Add-In folder, you have to be sure that you are
removing the associated folder in the C:\Users\<USER>\AppData\Local\Temp\Microsoft
Dynamics NAV\Add-Ins, else the same assembly will be used.
The Public Key Token of the assembly can be determined using any of
the following ways:
Using the FullName property of the
System.Reflection.Assembly.
Create a new Microsoft Visual Project,
Add the Microsoft.Dynamics.Framework.UI.Extensibility.dll
reference to the project ( for instance, "C:\Program
Files\Microsoft Dynamics NAV\80\Service\Add-ins\Microsoft.Dynamics.Framework.UI.Extensibility.dll"
)
Adds the exontrol.exg2ant to a form
Call the MessageBox.Show(exg2antt1.GetType().Assembly.FullName)
on form's Load event, and you should get a message like:
Press the CTRL+ C to copy the message, paste to Notepad, and
copy PublicKeyToken indicates the Public Key Token of the
assembly
Using the sn.exe tool of Microsoft SDK (source: https://msdn.microsoft.com/en-us/library/dd983825.aspx)
Locate the sn.exe file.
The default folder for the Microsoft .NET Framework SDK is
C:\program files\microsoft sdks\windows\v7.0\Bin.
At the command prompt, change to the directory that contains
the sn.exe utility.
Type the following command:
sn.exe -T <assembly>
Replace <assembly> with the add-in assembly's path and
file name, such as Program Files\Microsoft Dynamics NAV\60\RoleTailored
Client\Add-ins\MyCompany.MyProduct.RtcAddins.dll.
Press ENTER and note the public token key that is displayed.
In case you are making changes to the assembly dll, and you replace the DLL
in the NAV's Add-In folder, you have to be sure
that you are removing the associated folder in the C:\Users\<USER>\AppData\Local\Temp\Microsoft
Dynamics NAV\Add-Ins, else the same assembly will be used.
If you are doing multiple changes, updates, you can copy and paste the
assembly dll directly into associated folder on C:\Users\<USER>\AppData\Local\Temp\Microsoft
Dynamics NAV\Add-Ins folder.
All of our controls are royalty-free and run-time license-fee free. This
means that when you purchase our products (one copy per developer on your
project), you may distribute the component you purchased with your
applications without paying any run-time fees to us.
1 x License of Source Code Version of the Exontrol Component /NET
Additional licenses for Single / Team / Site version, depending on the
number of the developers are working on the project. For instance, if
you have three developers working on the project, you need additional 2
x Single License. If you have four developers, you need additional 1 x
Team License, and so on.
Related to the Source Code Version, If you are running the Microsoft
Dynamics NAV on a:
32-bit machine, you need only 1 x License of Source Code Version of
the Exontrol Component /NET for 32-bit
64-bit machine, you need only 1 x License of Source Code Version of
the Exontrol Component /NET for /ANY. The
Microsoft.Dynamics.Nav.Client.exe is running as 32-bit on a 64-machine,
while the Microsoft.Dynamics.Nav.Server.exe is running as 64-bit