Netsuite - 如何为 getall 请求指定 record_type

2024-04-24

我想获取所有 InventoryItems 的列表 根据这份文件:https://system.netsuite.com/help/helpcenter/en_US/Output/Help/SuiteCloudCustomizationScriptingWebServices/SuiteTalkWebServices/getAll.html 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>

但收到错误的响应:

<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>

我尝试过请求货币、状态 - 响应总是相同

我尝试过以下变体:

<GetAllRecordType>inventoryItem</GetAllRecordType>

and

<recordType>inventoryItem</recordType>

and

<GetAllRecordType>currency</GetAllRecordType>

and

<recordType>currency</recordType>

具有相同的响应:

 <platformCore:message>The getAll record type is required.</platformCore:message>

根据https://webservices.netsuite.com/xsd/platform/v2013_2_0/coreTypes.xsd https://webservices.netsuite.com/xsd/platform/v2013_2_0/coreTypes.xsd- 我已经正确指定了 recordType (顺便说一句,我也尝试过但没有成功)

我正在使用 ruby​​,但没有完整的 ruby​​ 库。现有的几乎不包含我将要使用的所有东西。

有人可以帮助我做错了什么或者可能有人有工作示例


getAll 不能用于所有记录类型。以下是 getAll 支持的内容:

预算类别

活动受众

活动类别

活动频道

竞选家庭

活动优惠

活动搜索引擎

活动订阅

垂直营销活动

成本类别

currency

线索来源

销售税项

state

支持案例问题

支持案例来源

支持案例优先

支持案例状态

支持案例类型

taxGroup

taxType

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Netsuite - 如何为 getall 请求指定 record_type 的相关文章

随机推荐