This CS is called from UE
# suitescript
v
This CS is called from UE
e
Take out the currentRecord from
function checkIsabelStatus(currentRecord)
, you already defined it in your define callback
you probably have an error in your browser console
v
define(['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 } } );
now this is my updated script, still it is same like executing till log.Debut('Entering check function in CS')
e
Copy code
function 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
		});
	}
}
v
@ehcanadian sir thank you so much its working fine.