I have the below js code i used in the button using ribbon benchwork and i want automatically to update the status field to completed if users clicks on that button , but it is not working.
function (executioncontext) {
"use strict";
var formContext = executioncontext.getFormContext();
if (formContext !== null) {
formContext.getControl('azmdc_AZstatus').setValue === 100000003; // AZstatus is a choice column and itx value 100000003 = completed
}
}
im not sure if above code correct to update the field, please let me know if need to change anything here. thanks