Share via


Application.eventRenameKey Method [AX 2012]

Serves as a callback that is called by the kernel when a primary key is renamed, if the kernel has been set up to monitor records in that table.

Syntax

public void eventRenameKey(
    Common _recordOrig, 
    Common _recordUpdated, 
    container _changedFields)

Run On

Server

Parameters

  • _recordOrig
    Type: Common Table
    The original record, before the rename.
  • _recordUpdated
    Type: Common Table
    The updated record (after the rename).
  • _changedFields
    Type: container
    A container of all changed fields.

Remarks

A developer can set up the kernel to call back on primary key renames for a given table by inserting a record into the DatabaseLog kernel table with all fields set to relevant values, which includes setting the logType field to EventRenameKey.

This resembles how logRenameKey is called and set up.

The call of this method will be in the transaction in which the primary key is renamed.

See Also

Application Class

DatabaseLog Table

Application.eventDelete Method

Application.eventInsert Method

Application.eventUpdate Method