Netsuite SuiteScript无法查询库存编号Bin记录或Bin编号

Netsuite SuiteScript无法查询库存编号Bin记录或Bin编号,netsuite,suitescript2.0,Netsuite,Suitescript2.0,我正在处理批次编号的存货,我必须获得“存货编号的箱子”记录或最起码的箱子编号。我有“库存编号”记录。我查看了“库存编号箱”的记录浏览器,它显示为“仅加入”,但我无法确定我加入了什么,因为可用的加入字段仅为“用户”。如果有人能给我指出正确的方向,我将非常感激 由于我在任何地方都找不到的原因,库存编号记录没有直接连接到库存编号Bin记录。但是,库存编号Bin记录充当库存编号和Bin记录之间的中介 如果您查看库存编号Bin记录,您将找到“库存编号”和“BINNAMER”列。可以在搜索中使用它们来获取记

我正在处理批次编号的存货,我必须获得“存货编号的箱子”记录或最起码的箱子编号。我有“库存编号”记录。我查看了“库存编号箱”的记录浏览器,它显示为“仅加入”,但我无法确定我加入了什么,因为可用的加入字段仅为“用户”。如果有人能给我指出正确的方向,我将非常感激

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

如果您查看库存编号Bin记录,您将找到“库存编号”和“BINNAMER”列。可以在搜索中使用它们来获取记录,而无需直接连接

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;
    });
});

哇!谢谢,当它说“只加入”的时候,我已经疯了,所以我想我必须“通过”另一张唱片,而不仅仅是使用过滤器。它们也有一个保存的搜索“类型”来连接它们,但您不能从代码中调用它,它声明它不能确定类型。太棒了,非常感谢,救生员。