【问题标题】:Suitescript nlapiSearchRecord cant load custom recordSuitescript nlapiSearchRecord 无法加载自定义记录
【发布时间】:2016-11-05 01:08:53
【问题描述】:

我有一个可能很简单的问题,但似乎找不到答案。

我有一个自定义记录,列表字段包含帐户中的项目记录。

每当我运行脚本时,它都会返回自定义记录中的 2 行,而不是我试图获取的特定记录。

我知道它的列表只是项目列表,但是当我尝试将“10”作为特定项目记录的内部 id 时,它会引发错误。

nlobjSearchFilter('custrecord_pm_int_inventory_item',null,'is','10');

它会抛出一个错误,我在 stackoverflow 上看到过类似的帖子,但并没有完全尝试加载具有 item 列表字段的自定义记录

// if inventory item has been found, check to see if it exists in the item tracking record
                var filt    = [];
                    filt[0] = new nlobjSearchFilter('custrecord_tc_int_inventory_item',null,'is','88999 shipping');
                var cols    = [];
                    cols[0] = new nlobjSearchColumn('internalid');
                    cols[1] = new nlobjSearchColumn('custrecord_tc_int_inventory_item');
                var search  = nlapiSearchRecord('customrecord_tc_int_item_tracking',null,filt,cols);

希望我只是遗漏了一些简单的东西,但我似乎无法加载记录,任何想法都非常感谢

【问题讨论】:

    标签: netsuite suitescript


    【解决方案1】:

    您必须使用 anyof 运算符并传递一个数组,它应该是这样的:

    // if inventory item has been found, check to see if it exists in the item tracking record
    var filt    = [];
        filt[0] = new nlobjSearchFilter('custrecord_tc_int_inventory_item',null,'anyof',['10']);
    var cols    = [];
        cols[0] = new nlobjSearchColumn('internalid');
        cols[1] = new nlobjSearchColumn('custrecord_tc_int_inventory_item');
    var search  = nlapiSearchRecord('customrecord_tc_int_item_tracking',null,filt,cols);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-03-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多