首页 文章

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

提问于
浏览
0

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

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

发生了什么?

编辑:

例如:

尝试为机会添加按钮:

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

    以下代码为我工作

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

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

    希望这会帮助你 .

相关问题