NoteNote

The content in this topic only applies to Microsoft Dynamics NAV 2009 SP1. For Microsoft Dynamics NAV 2009 content, see Developer and IT Pro Help for Microsoft Dynamics NAV 2009.

RoleTailored client pages include an OnControlAddin Trigger on field controls that control add-ins can invoke to run C/AL code. To invoke the OnControlAddIn trigger, a control add-in sends an event to Microsoft Dynamics NAV Server as illustrated in the following figure.

RoleTailored client control add-in events

An example of an event is when a user clicks a button in the control add-in display on the page. To program events in a control add-in, you implement the Microsoft.Dynamics.Framework.UI.Extensibility.IEventControlAddInDefinition interface.

An event sends data to Microsoft Dynamics NAV Server in two attributes: Index and Data. The Index attribute value is an integer data type. The Data attribute value is a text string data type. You add C/AL code to the OnControlAddIn trigger to process the data.

NoteNote

The Data attribute on the OnControlAddIn trigger supports both Text and BigText data types from Microsoft Dynamics NAV Server. The data type is determined by the SourceExpr property of the field control that is applied with the control add-in. If the SourceExpr property value is BigText, then the Data attribute is BigText. Otherwise, the Data attribute is Text[1024]. For more information on data types, see C/AL Functions.

For more information about creating events in a control add-in, see How to: Create a RoleTailored Client Control Add-in.

For more information about setting up the OnControlAddin trigger on a page, see How to: Set up a RoleTailored Client Control Add-in on a Page.

See Also