The following information is useful when you have enabled C/SIDE
to receive events from a component that it controls, for example,
an automation server.
There are certain limitations on the triggers that are
automatically generated for the events, which the component
provides. Furthermore, incoming data is subject to certain
restrictions.
Limitations
The following are the limitations exist for event triggers:
-
C/SIDE only supports the default outgoing, that is, source
interfaces, which are defined by the automation variable. If more
than one outgoing interface is defined by the automation server for
a coclass, only event triggers for the default outgoing interface
are generated in the C/AL code.
-
There can be a maximum of 39 parameters in function calls.
-
There can be a maximum of 1024 characters in prototype text
strings for functions.
-
The connectable object strategy in COM is used to connect
Microsoft Dynamics NAV and the automation server. The Sink object
defined in this strategy and implemented in Microsoft Dynamics NAV
only supports the IDispatch interface (and IUnknown). It is
therefore expected that the automation server calls on IDispatch
when executing events.
-
Parameter names will be truncated to a maximum of 30
characters.
-
There are no return values on event triggers.
-
The variable name along with "::" and the event trigger name
will be truncated to a maximum of 30 characters.
Restrictions on Incoming Data
All received data is copied to an internal data type, which can
handle any data type that COM allows. No data is lost in this
conversion and there is no check for valid AL data types.
The data will remain in this internal data type until it is used
inside the trigger. When data is used, it is converted to the
appropriate C/AL data type. Note, however, that if the data type is
Variant, no conversion occurs. No data is lost in the conversion
and all the required checks are made. If the conversion is not
possible because there is an invalid data type, or because data is
outside the range, the event trigger causes an error message to
displays and terminates execution. If data is never used in the
event trigger, no checks for valid data, data type, and data range
are performed.
If parameter is a VAR parameter (that is, called ByRef) and data
is used inside the event trigger, there will be an implicit
conversion just before the event trigger returns. A check is made
of whether conversion is possible. If this is not the case, an
error message is displays and the event trigger terminates.