`/**` * @NApiVersion 2.x * @NScriptType ClientSc...
# suitescript
v
/**
* @NApiVersion 2.x * @NScriptType ClientScript * @NModuleScope SameAccount */ define(['N/currentRecord'], function(currentRecord){ var exports = {}; function checkIsabelStatus(currentRecord) { log.debug('Entering check function'); var currentRecordGet = currentRecord.get(); log.debug('currentRecordGet',currentRecordGet); var isabelStatus = currentRecordGet.getValue({fieldId : 'custrecord_cmb_isabel_status'}); log.debug('1isabelStatus',isabelStatus); alert('alertmsg1'); if(!isabelStatus){ currentRecord.setValue({ fieldId : 'custrecord_cmb_isabel_status', value : true }); } return true; } function uncheckIsabelStatus(currentRecord){ log.debug('Entering uncheck function') var isabelStatus = currentRecord.getValue({fieldId : 'custrecord_cmb_isabel_status'}); alert('alertmesssage2'); log.debug('2isabelStatus',isabelStatus); if(isabelStatus){ currentRecord.setValue({ fieldId : 'custrecord_cmb_isabel_status', value : false }); } return true; } function saveRecord() {} exports.checkIsabelStatus = checkIsabelStatus; exports.uncheckIsabelStatus = uncheckIsabelStatus; exports.saveRecord = saveRecord; return exports; } );