2

我正在按工作流程添加一个按钮。稍后我想使用服务器脚本隐藏该按钮。为此,我需要按钮的内部 ID,如何在 netsuite 中获取按钮的内部 ID?

4

2 回答 2

0

在我的例子中,创建了一个带有文本字段的表单来存储一个值并隐藏该字段。这可能会有所帮助

var form = serverWidget.createForm({
                title: 'Simple Form'
            });
            var field = form.addField({
                id: 'custpage_file',
                type: 'file',
                label: 'Upload CSV'
            });
            form.addSubmitButton({
                label: 'Submit'
            });
           var textfield=form.addField({
                 id : 'custpage_vendor_id',
                 type : 'text',
                 label : 'Text',
                 value :'Text'
                 });
          textfield.defaultValue = 123;
          textfield.updateDisplayType({
                    displayType : serverWidget.FieldDisplayType.HIDDEN
                  });
          context.response.writePage(form);
于 2021-12-29T14:21:03.093 回答
0

如果要查找 ID,只需右键单击该按钮,然后单击“检查”(Microsoft Edge 或 Chrome)。

在打开的对话框中,您可以检查该字段id,您将获得按钮的 ID。

就像是 -

在此处输入图像描述

试试这个。让我知道。

于 2022-01-04T06:38:55.610 回答