vennila ramasamy
10/06/2022, 12:08 PMehcanadian
10/06/2022, 2:28 PMfunction checkIsabelStatus(currentRecord)
, you already defined it in your define callbackehcanadian
10/06/2022, 2:29 PMvennila ramasamy
10/06/2022, 2:41 PMdefine(['N/currentRecord'],
function(currentRecord){
function checkIsabelStatus(context){
log.debug('Entering Check Function in CS');
var currentRecord = context.currentRecord;
log.debug('currentRecord',JSON.stringify(currentRecord));
var isabelStatus = currentRecord.getValue({fieldId : 'custrecord_cmb_isabel_status'});
if(!isabelStatus){
currentRecord.setValue({
fieldId : 'custrecord_cmb_isabel_status',
value : true
});
}
}
function uncheckIsabelStatus(context){
log.debug('Entering uncheck function in CS');
var currentRecord = context.currentRecord;
var isabelStatus = currentRecord.getValue({fieldId : 'custrecord_cmb_isabel_status'});
log.debug('2isabelStatus',isabelStatus);
if(isabelStatus){
currentRecord.setValue({
fieldId : 'custrecord_cmb_isabel_status',
value : false
});
}
}
function saveRecord() {}
return{
checkIsabelStatus : checkIsabelStatus,
uncheckIsabelStatus : uncheckIsabelStatus,
saveRecord : saveRecord
}
}
);vennila ramasamy
10/06/2022, 2:42 PMehcanadian
10/06/2022, 2:48 PMfunction checkIsabelStatus(){
var cr = currentRecord.get();
var isabelStatus = cr.getValue({fieldId : 'custrecord_cmb_isabel_status'});
if(!isabelStatus){
cr.setValue({
fieldId : 'custrecord_cmb_isabel_status',
value : true
});
}
}
vennila ramasamy
10/06/2022, 3:02 PM