首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >SuiteScript无法查询库存号仓位记录或仓位编号

SuiteScript无法查询库存号仓位记录或仓位编号
EN

Stack Overflow用户
提问于 2019-08-15 21:55:03
回答 1查看 526关注 0票数 0

我的工作与批次编号库存,我必须获得“库存编号仓位”记录或最小的仓位编号。我有“库存编号”的记录。我在记录浏览器中查找"Inventory Numbered“,它显示为"join only”,但我不知道我连接的是什么,因为可用join字段仅为"user“。如果有人能给我指明正确的方向,我将不胜感激。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-08-19 14:20:42

由于我似乎在任何地方都找不到的原因,库存编号记录没有直接连接到库存编号Bin记录。但是,库存编号Bin记录充当库存编号和Bin记录之间的中介。

如果您查看Inventory Number Bin记录,您会发现"inventorynumber“和"binnumber”列。可以在没有直接联接的情况下在搜索中使用它们来获取记录。

代码语言:javascript
复制
require(['N/search', 'N/record'], function(search, record) {
  // Load an inventory number record
  var inventoryNumber = record.load({ type: 'inventorynumber', id: 1234 });
  // Get the inventory number field
  var inventoryNumberId = inventoryNumber.getValue('inventorynumber');

  search.create({
    type: 'inventorynumberbin',
    filters: ['inventorynumber', 'is', inventoryNumberId],
    columns: ['binnumber']
  }).run()
    .each(function(result) {
      // Log the bin numbers related to the inventory number
      log.debug(result.getValue('binnumber'));
      return true;
    });
});
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57510762

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档