“RenamePrimaryKey” function allows us to rename the primary key of almost any record. It is irreplaceable if a record was saved by mistake or simply needs renaming. The function ensures data consistency, that is, all related records are renamed too. It can be accessed from the Record information form, which can be opened by selecting Record info from the right-click menu on any record.
Rename primary key is the method which you will find in almost all the tables under override method. Basically this method can be useful when you are renaming primary key of the table by writing job in AOT(i.e, using table buffer and calling the method accordingly). Just look at the example:
Usually as long as there is a primary index, this functionality should be enabled automatically. xRecord class which has this method is a kernel class.
Hope this object is compiled and synchronized without any errors. Is there a foreign key relationship setup?