简体   繁体   English

Netsuite用户事件脚本:并非所有用户事件类型都会触发

[英]Netsuite User Event Script: Not all user event types firing

We have a user event script attached to a sales order in NetSuite, however we are noticing that only the context.UserEventType.CREATE is being called. 我们在NetSuite中附加了一个销售订单的用户事件脚本,但是我们注意到只调用了context.UserEventType.CREATE EDIT , COPY and the others DO NOT catch the sales order manipulations as per spec. 编辑复制和其他人不按照规范捕获销售订单操作。 Can anyone please verify this. 任何人都可以验证这一点。 Ive attached a very simple UserEvent script that should throw the context type but it is not working. 我附加了一个非常简单的UserEvent脚本,该脚本应抛出上下文类型,但它不起作用。

This UserEvent script is for a salesorder record: 此UserEvent脚本用于销售订单记录:

/**
 *@NApiVersion 2.x
 *@NScriptType UserEventScript
 */
define(["N/record", "N/search"],
    function (record, search) {

        function beforeSubmit(context) {
            throw "beforeSubmit:" + context.type;
        }

        function afterSubmit(context) {
            throw "afterSubmit:" + context.type;
        }

        function beforeLoad(context) {
            throw "beforeLoad:" + context.type;
        }

        return {
            beforeLoad: beforeLoad,
            beforeSubmit: beforeSubmit,
            afterSubmit: afterSubmit
        };

    });

The code looks good. 代码看起来不错。 Check the deployment and see if the event type is set to create only. 检查部署并查看事件类型是否设置为仅创建。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 部署用户事件脚本以从Netsuite ERP中部署的所有套件中获取所有字段和值 - Deploy user event script to get all fields and values from all suitelets deployed in Netsuite ERP Netsuite用户事件脚本正在获取JavaScript全局变量的空值 - Netsuite User Event Script is Getting Empty values for the JavaScript Global Variable 如何在netsuite上使用用户事件套件脚本更新不支持的交易类型(例如,账单)上的字段 - How can I update fields on unsupported transaction types such as Bill with user event suitescript on netsuite 如何让我的 for 循环在 NetSuite 的用户事件脚本中包含最后一行? - How do I get my for loop to include the last line in a user event script in NetSuite? 将用户事件脚本上载到NetSuite(SuiteScript 2.0)时,不存在N / currentRecord模块 - N/currentRecord module does not exist when uploading User Event script to NetSuite (SuiteScript 2.0) jQuery事件提交未按用户操作触发 - jQuery event submit not firing on user action 无法验证用户输入-无法触发onkeyup事件 - Unable to validate user input - onkeyup event not firing 在NetSuite上的“删除”用户事件期间该如何做? - How to do something during the “Delete” user event on NetSuite? 按钮上的Onclick事件仅针对一个用户触发两次? - Onclick event on button firing twice for one user only? Google Chrome中的用户控件中的元素未触发Javascript单击事件 - Javascript click event not firing on element in user control in google chrome
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM