If you need to do an update to a record but the column/field is either locked or not on the form then you can use the Xrm.Page JavaScript approach to update the record.

There is an article by Carl de Souza with the syntax for the JavaScript to update a record here https://carldesouza.com/update-a-record-using-xrm-webapi/

If you add an extra variable called entityType you can fetch the schema name of the table from the Xrm.Page object and save yourself having to enter the schema name. Just update the data variable with the schema names and values to update them.

var data =
    {
        "cm_name": "Don Draper",
        "cm_lastname": "Draper",
        "cm_firstname": "Don"
    }
 
var Id = Xrm.Page.data.entity.getId().replace("{", "").replace("}", "");
var entityType= Xrm.Page.data.entity.getEntityName();

Xrm.WebApi.updateRecord(entityType, Id, data).then(
    function success(result) {
        console.log("Success");
    },
    function (error) {
        console.log(error.message);
    }
);

Open the record to update, then hit F12 and past the above into the console and hit return. Refresh the page to see the update.