Hey All.. this may be a very simple error. This is a UE script.
From my code:
*/
function beforeSubmit(scriptContext) {
// only if context is Create, set the vendor record to the internal ID on record
if (scriptContext.type == scriptContext.UserEventType.CREATE)
{
var newRec = scriptContext.newRecord;
var vendorInternalID = newRec.getValue({fieldId: 'custrecord_ur_ve_intenral_id'});
var id = newRec.setValue({
fieldId: 'custrecordur_ve_vendor',
value : vendorInternalID,
ignoreFieldChange: false
});
newRec.save();
}
return true;
}
I get an error

{"type":"error.SuiteScriptError","name":"THAT_RECORD_IS_NOT_EDITABLE","message":"That record is not editable.","stack":["createError(N/error)","beforeSubmit(/SuiteScripts/UR_Vendor_Evaluation/UR_Vendor_Evaluation_UserEventScript.js:62)","createError(N/error)"],"cause":{"name":"THAT_RECORD_IS_NOT_EDITABLE","message":"That record is not editable."},"id":"","notifyOff":false}