gpt4 book ai didi

javascript - 在 NetSuite 中向自定义交易表单添加操作

转载 作者:行者123 更新时间:2023-12-02 22:42:12 25 4
gpt4 key购买 nike

我正在尝试向 NetSuite 中自定义事务表单上的“操作”菜单添加新的菜单选项。我可以在表单上的“操作”菜单中看到我的选择,但在选择操作时无法触发 UserEvent 脚本中的 beforeLoad 函数来调用 clientScript。

当我按原样运行代码时,我收到一条消息,指出“beforeLoad”未定义,尽管我正在脚本底部返回该函数。我无法将操作添加到“标准操作选项卡”,尽管这似乎是存在其他操作的地方。

非常感谢任何帮助! :)

NS Custom Actions

 * @NApiVersion 2.x
* @NScriptType UserEventScript
*/

define([],
function () {
function beforeLoad(context) {
if(context.type == 'edit'){
context.form.clientScriptModulePath = 'folder/clientscriptpath.js';
}
}

return {
beforeLoad: beforeLoad
};
}
);

最佳答案

我相信您必须加载“N/ui/serverWidget”模块才能使用 context.form

关于javascript - 在 NetSuite 中向自定义交易表单添加操作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58548004/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com