我想获取所有 InventoryItems 的列表根据此文档:https : //system.netsuite.com/help/helpcenter/en_US/Output/Help/SuiteCloudCustomizationScriptingWebServices/SuiteTalkWebServices/getAll.html
我正在形成以下请求:
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:platformMsgs="urn:platform_2013_1.webservices.netsuite.com" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header>
<passport>
<email>******</email>
<password>******</password>
<account>******</account>
</passport>
</env:Header>
<env:Body>
<platformMsgs:getAll>
<recordType>InventoryItem</recordType>
</platformMsgs:getAll>
</env:Body>
</env:Envelope>
Run Code Online (Sandbox Code Playgroud)
但收到错误响应:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<platformMsgs:documentInfo xmlns:platformMsgs="urn:messages_2013_1.platform.webservices.netsuite.com">
<platformMsgs:nsId>WEBSERVICES_969904_100920131651936419141601801_cbf1690968b43</platformMsgs:nsId>
</platformMsgs:documentInfo>
</soapenv:Header>
<soapenv:Body>
<getAllResponse xmlns="urn:platform_2013_1.webservices.netsuite.com">
<platformCore:getAllResult xmlns:platformCore="urn:core_2013_1.platform.webservices.netsuite.com">
<platformCore:status isSuccess="false">
<platformCore:statusDetail type="ERROR">
<platformCore:code>GETALL_RCRD_TYPE_REQD</platformCore:code>
<platformCore:message>The getAll record type is required.</platformCore:message>
</platformCore:statusDetail>
</platformCore:status>
</platformCore:getAllResult>
</getAllResponse>
</soapenv:Body>
</soapenv:Envelope>
Run Code Online (Sandbox Code Playgroud)
我试图请求货币,状态 - 响应总是相同的
我尝试了以下变体:
<GetAllRecordType>inventoryItem</GetAllRecordType>
Run Code Online (Sandbox Code Playgroud)
和
<recordType>inventoryItem</recordType>
Run Code Online (Sandbox Code Playgroud)
和
<GetAllRecordType>currency</GetAllRecordType>
Run Code Online (Sandbox Code Playgroud)
和
<recordType>currency</recordType>
Run Code Online (Sandbox Code Playgroud)
有同样的回应:
<platformCore:message>The getAll record type is required.</platformCore:message>
Run Code Online (Sandbox Code Playgroud)
根据https://webservices.netsuite.com/xsd/platform/v2013_2_0/coreTypes.xsd - 我已经正确指定了recordType(顺便说一句,我也尝试过但没有成功)
我正在使用 ruby,但没有完整的 ruby 库。存在的那个几乎不包含我将要使用的所有东西。
有人可以帮助我我做错了什么,或者可能有人有工作示例
小智 5
getAll 不能用于所有记录类型。以下是通过 getAll 支持的内容:
预算类别
活动受众
活动类别
活动频道
竞选家庭
活动优惠
广告系列搜索引擎
活动订阅
活动垂直
成本类别
货币
线索来源
销售税项
状态
支持案例问题
支持案例来源
支持案例优先级
支持案例状态
支持案例类型
税务集团
税种
| 归档时间: |
|
| 查看次数: |
6389 次 |
| 最近记录: |