Share via


xRecord.skipEvents Method

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

Syntax

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.

Remarks

This method resembles the xRecord.skipDatabaseLog method. The skipEvents method is also used internally in the kernel 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.

See Also

xRecord Class

xRecord.skipDatabaseLog Method

xApplication.deleteCompany Method

SqlDataDictionary.tableDelete Method

RecordInsertList Class