xApplication.eventRenameKey Method [AX 2012]

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

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

Run On

Server

Parameters

recordOrig
Type: Common Table
The original record, from before the rename.
recordUpdated
Type: Common Table
The updated record (after the rename).
changedFields
Type: container
A container of all changed fields.

A developer can set up the kernel to call back on primary key renames 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 EventRenameKey.

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

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

Community Additions

ADD
Show: