【问题标题】:how to access the inventory details of an item master record using suitescript 1.0?如何使用 suitescript 1.0 访问项目主记录的库存详细信息?
【发布时间】:2021-04-29 06:55:51
【问题描述】:

我只需要获取手头数量、订单数量、延期交货数量、物品在哪个箱号下、价值和平均。一个项目的成本。只需在普通文本字段中向我的经理展示即可。 我尝试从搜索中进行,但值不是根据库存详细信息。

我的经理说我不要使用搜索并使用加载子记录,但我找不到加载子记录的任何想法。

我当前在客户端脚本上的代码:

function pageInit() {

   var itemSearch = nlapiSearchRecord("item", null,
    [
      ["name", "haskeywords", "ZE001156"],
    ],
    [
      new nlobjSearchColumn("itemid").setSort(false),
      new nlobjSearchColumn("displayname"),
      new nlobjSearchColumn("location"),
      new nlobjSearchColumn("quantityonhand"),
      new nlobjSearchColumn("quantityonorder"),
      new nlobjSearchColumn("quantitybackordered"),
      new nlobjSearchColumn("averagecost"),
      new nlobjSearchColumn("binnumber")
    ]
  );
  nlapiLogExecution('DEBUG', 'itemSearch', JSON.stringify(itemSearch));
  nlapiLogExecution('DEBUG', 'itemSearch.length', itemSearch.length);
  if (itemSearch.length > 0) {
    for (var i = 0; i < itemSearch.length; i++) {
      var srchLine = itemSearch[i];
      var onHand = srchLine.getValue('quantityonhand');
      nlapiLogExecution('DEBUG', 'on hand:' + i, onHand);
      var onOrder = srchLine.getValue('quantityonorder');
    }
  } 
}

【问题讨论】:

    标签: netsuite suitescript


    【解决方案1】:

    【讨论】:

    • 谢谢詹姆斯,你说的很对,但是因为我在别人的监督下工作,所以我需要听从他的命令...
    • 不用担心,但您可以向他建议您应该使用的版本。我直接与 NS 合作,所以请为以后的麻烦保存自己
    猜你喜欢
    • 2017-09-17
    • 2014-07-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-06-08
    • 2018-09-02
    • 2014-10-26
    相关资源
    最近更新 更多