为什么我的setscript不会部署脚本?

时间:2015-05-14 21:29:31

标签: netsuite

我不知道什么时候开始,但我认为这是在我使用重命名的IDE进行重构之后发生的。

无论如何,如果我通过表格附加脚本,他们就会开火。但是,虽然存在部署记录,但我的用户事件或客户端脚本都会触发。该部署记录使用相同的脚本,如果它通过表单自定义代码区附加,则可以正常工作。

发生了什么事?

编辑:

For Instance:

尝试为机会添加按钮:

function userEventBeforeLoad(type, form, request){
  var list = form.getSubList("item");
  list.addButton('custpage_customconfigurebutton', 'Configure', 'clientStartConfigurator()');
}

上传脚本

enter image description here

添加到“脚本”

enter image description here

部署:

enter image description here

当我“创造机会”时,它永远不会激发? 我的用户事件脚本没有触发

编辑2(根据要求提供新屏幕

enter image description here

enter image description here

1 个答案:

答案 0 :(得分:0)

以下代码为我工作

function userEventBeforeLoad(type, form, request) {
        //nlapiLogExecution('error', 'type', type);
        var list = form.getSubList("item");
        list.addButton('custpage_customconfigurebutton', 'Configure',"alert('Hello World')");
}

我怀疑您的clientStartConfigurator()可能有错误。要进行验证,您还可以在单​​击按钮时使用浏览器控制台查看您是否已成功从相应的功能返回。

希望这会对你有所帮助。