php - How do I get the serialized inventory item by the inventory id in NetSuite api with PHP?
问题描述
Here is the situation, I'm trying to get the Serialized Inventory Item based on the id (https://xxx.app.netsuite.com/app/common/item/item.nl?id=522216), however, when I tried the following code:
$search = new TransactionSearchBasic();
$type = new SearchEnumMultiSelectField();
$type->operator = 'anyOf';
$type->searchValue = array('serializedInventoryItem');
$search->type = $type;
$invetoryRef = new RecordRef();
$invetoryRef->internalId = '522216';
$params = new SearchMultiSelectField();
$params->operator = 'anyOf';
$params->searchValue = array($invetoryRef);
$search->serializedInventoryItem = $params;
$request = new SearchRequest();
$request->searchRecord = $search;
$searchResponse = $service->search($request);
However, the response that I'm getting the following error:
The field type's enum value is invalid for this search.
Why would I be getting that error message?
Thank you,
Kevin Davis
解决方案
推荐阅读
- recursion - 如何在我的相互递归程序中完成步骤数?
- mqtt - MQTT 无法使用,我做错了什么?我在这个 sudo nano mosquitto -c 删除配置
- mysql - 我有 2 个表。T1-主表,T2-历史数据。想要对 T1 中所有在 T2 中有多个名称条目的记录的名称列进行 EXISTS 查询
- java - 将 JUnit 5 @BeforeEach 中的参数传递给单个测试
- php - 为什么 Laravel 邮件不能在实时服务器上运行?
- c# - 不等待异步调用仍然是异步的,对吗?
- ruby-on-rails - Rails (Active Record) - 返回所有字段的列表
- firebase - 为 Firebase 函数中文档的特定参数激活函数 (OnUpdate)
- arm - Fill erased memory with something like assert(false) on ARM Cortex-M4
- mysql - Trying to calculate the conversion rate of customers who just sign a virtual greeting card to eventually buying a card