Client Extensibility API Overview

Microsoft Dynamics NAV 2018 includes the client extensibility API, which defines the model for creating Microsoft Dynamics NAV Windows client control add-ins. The client extensibility API uses .NET interfaces as the binding mechanism between the control add-ins on a page and the Microsoft Dynamics NAV framework. When you develop a control add-in, you can choose among various definition interfaces and base classes to implement based on the control add-in requirements. Additionally, you can create custom interfaces to add user interface controls to a page. This topic provides an overview of the available definition interfaces and base classes. For information about how to create custom interfaces, see Exposing Methods and Properties in a Windows Client Control Add-in.

Control Add-in Definition Interfaces

You can develop a control add-in to bind with data in the Dynamics NAV database and raise events that call the OnControlAddin trigger on a page field control that is applied with the control add-in. For more information, see Binding a Windows Client Control Add-in to the Database and Exposing Events and Calling Respective C/AL Triggers from a Windows Client Control Add-in.

To support data binding and events in a control add-in, you must implement one of the control add-in definition interfaces that are described in the following table.

Interface Use
Microsoft.Dynamics.Framework.UI.Extensibility.IValueControlAddInDefinition Base interface that binds the control add-in with System.String or System.Object data types as defined by the T parameter.

Displays text strings or binary data from the Microsoft Dynamics NAV database. Note: The Microsoft.Dynamics.Framework.UI.Extensibility.WinForms.StringControlAddInBase base class implements this interface with a System.String data type.
Microsoft.Dynamics.Framework.UI.Extensibility.IEventControlAddInDefinition Base interface that defines a Microsoft.Dynamics.Framework.UI.Extensibility.ControlAddInEventHandler event.

Uses events to call the OnControlAddin Trigger of a page field control. Note: The Microsoft.Dynamics.Framework.UI.Extensibility.WinForms.StringControlAddInBase class implements this interface.
Microsoft.Dynamics.Framework.UI.Extensibility.IObjectControlAddInDefinition Base interface that binds the control add-in with a System.Object data type and raises a Microsoft.Dynamics.Framework.UI.Extensibility.ControlAddInEventHandler event.

Displays binary data from a Microsoft Dynamics NAV database and uses events to call the OnControlAddin trigger of a page field control.
Microsoft.Dynamics.Framework.UI.Extensibility.IStringControlAddInDefinition Base interface that binds the control add-in with a System.String data type and provides a control add-in definition interface that raises a Microsoft.Dynamics.Framework.UI.Extensibility.ControlAddInEventHandler event.

Displays text strings from Microsoft Dynamics NAV Server and uses events to call the OnControlAddin trigger of a page field control. Note: The Microsoft.Dynamics.Framework.UI.Extensibility.WinForms.StringControlAddInBase class implements this interface.
Microsoft.Dynamics.Framework.UI.Extensibility.IBooleanControlAddInDefinition Base interface that binds the control add-in with a System.Boolean data type and raises a Microsoft.Dynamics.Framework.UI.Extensibility.ControlAddInEventHandler event.Displays binary data from a Microsoft Dynamics NAV database and uses events to call the OnControlAddin trigger of a page field control.
Microsoft.Dynamics.Framework.UI.Extensibility.ICharControlAddInDefinition Base interface that binds the control add-in with a System.Char data type and raises a Microsoft.Dynamics.Framework.UI.Extensibility.ControlAddInEventHandler event.Displays binary data from a Microsoft Dynamics NAV database and uses events to call the OnControlAddin trigger of a page field control.
Microsoft.Dynamics.Framework.UI.Extensibility.IDateTimeControlAddInDefinition Base interface that binds the control add-in with a System.DateTime data type and raises a Microsoft.Dynamics.Framework.UI.Extensibility.ControlAddInEventHandler event.Displays binary data from a Microsoft Dynamics NAV database and uses events to call the OnControlAddin trigger of a page field control.
Microsoft.Dynamics.Framework.UI.Extensibility.IDecimalControlAddInDefinition Base interface that binds the control add-in with a System.Decimal data type and raises a Microsoft.Dynamics.Framework.UI.Extensibility.ControlAddInEventHandler event.Displays binary data from a Microsoft Dynamics NAV database and uses events to call the OnControlAddin trigger of a page field control.
Microsoft.Dynamics.Framework.UI.Extensibility.IGuidControlAddInDefinition Base interface that binds the control add-in with a System.Guid data type and raises a Microsoft.Dynamics.Framework.UI.Extensibility.ControlAddInEventHandler event.Displays binary data from a Microsoft Dynamics NAV database and uses events to call the OnControlAddin trigger of a page field control.
Microsoft.Dynamics.Framework.UI.Extensibility.IInt32ControlAddInDefinition Base interface that binds the control add-in with a System.Int32 data type and raises a Microsoft.Dynamics.Framework.UI.Extensibility.ControlAddInEventHandler event.Displays binary data from a Microsoft Dynamics NAV database and uses events to call the OnControlAddin trigger of a page field control.
Microsoft.Dynamics.Framework.UI.Extensibility.IInt64ControlAddInDefinition Base interface that binds the control add-in with a System.Int64 data type and raises a Microsoft.Dynamics.Framework.UI.Extensibility.ControlAddInEventHandler event.Displays binary data from a Microsoft Dynamics NAV database and uses events to call the OnControlAddin trigger of a page field control.
Microsoft.Dynamics.Framework.UI.Extensibility.ITimeSpanControlAddInDefinition Base interface that binds the control add-in with a System.TimeSpan data type and raises a Microsoft.Dynamics.Framework.UI.Extensibility.ControlAddInEventHandler event.Displays binary data from a Microsoft Dynamics NAV database and uses events to call the OnControlAddin trigger of a page field control.

Control Add-in Base Classes

To develop control add-ins that target Windows Forms–based displays, the client extensibility API includes the Microsoft.Dynamics.Framework.UI.Extensibility.WinForms.IWinFormsControlAddIn interface. You can implement this interface explicitly and override its members, or you can implement an available abstract base class that implements the interface for you. Use the following table to decide which base class to use.

Base class Use
Microsoft.Dynamics.Framework.UI.Extensibility.WinForms.WinFormsControlAddInBase Base class that targets Windows forms displays with a control add-in.

You can use this base class for any control add-in with an appropriate control add-in definition interface.
Microsoft.Dynamics.Framework.UI.Extensibility.WinForms.StringControlAddInBase Base class that implements the Microsoft.Dynamics.Framework.UI.Extensibility.IValueControlAddInDefinition and Microsoft.Dynamics.Framework.UI.Extensibility.IEventControlAddInDefinition

interfaces.

This base class overrides the IValueControlAddInDefinition.Value property to bind the control add-in to a System.String data type in Microsoft Dynamics NAV Server. It also defines the StringControlAddInBase.RaiseControlAddInEvent(Int32, String) method for raising events.

You can use this base class for a control add-in that displays text strings from a simple text box control and supports events that call the C/AL trigger on the page.

See Also

Developing Windows Client Control Add-ins
How to: Create a Windows Client Control Add-in
Binding a Windows Client Control Add-in to the Database
Exposing Events and Calling Respective C/AL Triggers from a Windows Client Control Add-in
Installing and Configuring Windows Client Control Add-ins on Pages
Windows Client Control Add-in Overview