Netsuite字段更改值

问题描述 投票:0回答:1

如何检测脚本何时更改了字段值,实际上我们有一个按钮并更新发票中的字段值(我无法编辑此脚本)>

/**
 * @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;
});

我如何检测字段何时更改但不是用户更改?

我如何检测脚本何时更改了字段值,实际上我们有一个按钮并更新发票/ ** * @NApiVersion 2.x * @NScriptType中的字段值(我无法编辑此脚本)。 。

netsuite suitescript
1个回答
0
投票

N /运行时模块是必需的:

© www.soinside.com 2019 - 2024. All rights reserved.