小编jeb*_*eee的帖子

在字段更改时隐藏其他字段 - Suite Script 2.0

我想在选择框(选项)中选择项目后隐藏ID"custrecord_hrx_vendor_status_list".

这是我的代码./***@NApiVersion 2.x*@NScriptType ClientScript*/

define(['N/ui/serverWidget','N/error'],

function (error) {

    function fieldChanged(context) {
        var currentRecord = context.currentRecord;
        var fieldId = context.fieldId;
        if( fieldId === 'custrecord_hrx_negotiation_type' ){
            var selectedType = currentRecord.getText(fieldId);
            console.log(currentRecord.getField('custrecord_hrx_vendor_status_list'));

            currentRecord.updateDisplayType({
                id: 'custrecord_hrx_vendor_status_list',
                displayType: serverWidget.FieldDisplayType.HIDDEN
            });
        }
    }

    return {
        fieldChanged: fieldChanged
    }


}
Run Code Online (Sandbox Code Playgroud)

);

----这就是错误

在此输入图像描述

netsuite suitescript

1
推荐指数
1
解决办法
1818
查看次数

标签 统计

netsuite ×1

suitescript ×1