xApplication.eventUpdate Method

Serves as a callback that is called by the kernel when a record in a table is updated, provided that the kernel has been set up to monitor records in that table.

Syntax

public void eventUpdate(
    Common recordOrig, 
    Common recordUpdated, 
    container changedFields)

Run On

Server

Parameters

  • recordOrig
    Type: Common Table
    The original record, from before the update.
  • changedFields
    Type: container
    A container of all changed fields.

Remarks

A developer can set up the kernel to call back on updates for a given table. This is accomplished by inserting a record into the DatabaseLog kernel table with all fields set to relevant values, which includes setting the field logType to EventUpdate. It is possible to set up the kernel to call back whenever a record is updated or when a specific field is updated.

This is very similar to how the logUpdate method is called and set up.

The call of this method will be in the transaction in which the record is updated.

See Also

xApplication Class

DatabaseLog Table

xApplication.eventDelete Method

xApplication.eventInsert Method

xApplication.eventRenameKey Method

xApplication.logUpdate Method