How can I detect when a field value changed by a script, Actually we have a button and update a field value ( i can“t edit this script) in invoices
/**
* @NApiVersion 2.x
* @NScriptType ClientScript
* @Autor *****
* @NModuleScope Public
* @Company ******
* @NModuleScope Public
*
*/
define([ 'N/error', 'N/record', 'N/currentRecord', 'N/log', 'N/runtime', 'N/url', 'N/https' ], function( error, record, currentRecord, log, runtime, url, https ) {
var handler= {};
handler.fieldChanged = function ( context ) {
try{
var currentRecord = context.currentRecord;
var field= context.fieldId
if(campo='custbody_uuid')
log.error( 'UUID', currentRecord.getValue({ fieldId: 'custbody_uuid' })) ;
return;
}catch(e)
{
log.error( 'ERROR_fieldChanged', JSON.stringify(e) );
}
}
return handler;
});
How i can detect when a field changed but not by a user?