Rename or Change the value of Primary Key in BC D365:
(1) Introduction: When you want to change the value of a primary key, then RENAME method is used.
(2) Syntax:
| [Ok := ] Record.Rename(Value1: Any [, Value2: Any,…]) |
(3) Let’s take two examples one is to change Document No. of Sales Order Document & the second is to change Document No. of Sales Quote as shown.

(4) Note: Do not disturb the sequence of the primary keys. Suppose in the above example, document no. is changed but document type is also defined with the old value.


![Issue in Installing AL Symbol in VS editor [Solved] Issue in Installing AL Symbol in VS editor [Solved]](https://erpconsultors.com/wp-content/uploads/2021/07/Issue-in-Installing-AL-Symbol-in-VS-editor-180x120.jpg)



