小编Ven*_*man的帖子

我们如何获取 UserEvent SuiteScript 2.0 中的记录类型

我们如何获取 UserEvent SuiteScript 2.0 中的记录类型?

我想为 1 种以上的记录类型(客户付款、贷项凭证、存款、发票)部署我的 SuiteScript

现在,在我的 SuiteScript 中,我需要识别记录类型并根据它执行操作。

我的代码:

define(['N/record', 'N/https'],
function(record,https)
{
    function afterSubmit(context)
    {
        var myUrl = 'My url here';

        var rType = context.newRecord.Type;
        log.debug({title: 'rType1 ', details: rType });
        //This returns nothing

        rType = record.Type;
        log.debug({title: 'rType2 ', details: rType });
        //This gives all the available record types in Netsuite

        var JsonPayload = 'need to know whether its an invoice or a payment here';
        log.debug({title: 'payload ', details: JsonPayload });

        var response = …
Run Code Online (Sandbox Code Playgroud)

javascript netsuite suitescript2.0

1
推荐指数
1
解决办法
5408
查看次数

标签 统计

javascript ×1

netsuite ×1

suitescript2.0 ×1