Xrm.WebApi.updateRecord returns a promise and accepts a success callback and an error callback. The error callback receives an object that contains the error details, so the error handler at line UR06 is a function that takes the error object and writes error.message.
Server.GetLastError and console.writeline are server-side .NET constructs and are not valid in a client script.
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit