Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

xRecord.skipEvents Method [AX 2012]

Provides an option to turn off calling the Application.event* methods for the lifetime of an xRecord object.

public boolean skipEvents([boolean newValue])

Run On

Called

Parameters

newValue
Type: boolean
A Boolean value that indicates whether to skip events; optional.

Return Value

Type: boolean
true if events are skipped; otherwise, false.

This method resembles the xRecord.skipDatabaseLog method. The skipEvents method is also used internally in the kernel in order to skip events that make no sense to generate; this is consistent with the current behavior of the xRecord.skipDatabaseLog method:

  • The Application.deleteCompany method: Event generation is turned off for the duration of a company delete operation. This is an admin operation and it could cause performance issues to support events in this case.

  • The SqlDataDictionary.tableDelete method: Event generation is turned off for the duration of a table delete. This is an admin operation and it could cause performance issues to support events in this case.

  • The RecordInsertList class, which implements array insert capabilities in the kernel, takes an optional argument, _skipEvents = false, in the new method that will conditionally skip events as specified by a developer. Even if events are not skipped this will not make the kernel rewrite the SQL.

  • When a primary key is renamed, event generation is turned off for the duration of the rename operation. This includes a primary key in one record and can include a foreign key in many records. After the rename operation, the eventRenameKey method is called.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.