Understanding immutable keys
In Dynamics 365 Business Central, all tables have a (unique) immutable key (a GUID
field) that can be used for integration scenarios and for replacing the old RECORDID
property. This field is called SystemId
and it's a GUID data type field that specifies a unique, immutable (read-only) identifier for records in a table.The SystemId
field (identified with the field number 2000000000
on every table object) has the following characteristics:
- It has a value for every record in a table.
- You can assign a value at insert time; otherwise, the platform automatically assigns one.
- Once
SystemId
has been set, it cannot be changed. - There is always a unique secondary key in the
SystemId
field.
As a platform rule, modifying SystemId
of an existing record is not allowed. The INSERT
function has an override method for handling the SystemId:
Record.Insert([RunTrigger: Boolean[, InsertWithSystemId: Boolean]])
SystemId
can be manually specified when inserting a new record...