reptar
08/13/2019, 4:24 PMcurrentRecord.setValue()
. How can I accomplish this? I want it to populate when the first field is selected, so beforeLoad/beforeSubmit/afterSubmit are not viable options.battk
08/13/2019, 4:26 PMbattk
08/13/2019, 4:26 PMreptar
08/13/2019, 4:28 PMreptar
08/13/2019, 4:31 PMbattk
08/13/2019, 4:32 PM/**
* @NApiVersion 2.x
* @NScriptType ClientScript
*/
define([], function() {
function fieldChanged(context) {
if (context.fieldId !== "custrecord72") {
return;
}
var requestType = context.currentRecord.getValue({
fieldId: "custrecord72" // sandbox
});
if (requestType === "1") {
context.currentRecord.setValue({
fieldId: "custrecord_cxt_engaged",
value: "2" // Not engaged
});
}
}
return {
fieldChanged: fieldChanged
};
});
battk
08/13/2019, 4:32 PMbattk
08/13/2019, 4:32 PM