CancelEventChain method

Applies to

Syntax

Plug-ins receive events in the order the plug-ins are listed in Eilocal.ini. (Refer, LogicalEventOrder in Eiglobal.ini in ReadSoft Invoices INI help) For example, if you have three plug-ins that handle the AppStarted event, the event will be received by Plugin1 first, then Plugin2, and then Plugin3. If more than one plug-in subscribes to an event, the first plug-in can prevent the event from being passed to the remaining plug-ins. Use the CancelEventChain method to prevent an event from continuing to the next plug-in that subscribes to the event.

This is especially important when your plug-in returns evtCancel or evtOkAbort. For example, if your customized plug-in subscribes to the InvoiceApproved event and returns evtCancel or evtOkAbort, ReadSoft Invoices does not consider the invoice to be Approved. Using CancelEventChain ensures that ReadSoft Invoices does not receive evtOk from the REPORTER Plug-in for ReadSoft Invoices (for example) at InvoiceApproved.

object.CancelEventChain()

Part

Description

object

An expression evaluating to an object of type Application, InterpretApp, ScanAppVerifyApp, ManagerApp, , OptimizerApp, TransferApp.

Related topics

Event order

Calling conventions