✏️ Explanatory Question
Handling locking records for update in X++: To lock records for update, use the forUpdate keyword:
select forUpdate CustTable where CustTable.AccountNum == '4000';
CustTable.Name = 'New Name';
CustTable.update();