NetSuite SuiteTalk 返回授权

NetSuite SuiteTalk ReturnAuthorization

我正在尝试从销售订单创建 Return 授权,但无法确定所需的参数。

我一直收到以下错误:

You must enter at least one line item for this transaction.

如果我尝试在销售订单中包含其中一个订单项的 ID,我会收到以下错误消息:

Savon::SOAPFault ((soapenv:Server.userException) com.netledger.util.schemabean.NLSchemaBeanException: id not found on {urn:customers_2016_2.transactions.webservices.netsuite.com} ReturnAuthorizationItem

这是我当前的请求

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:platformMsgs="urn:messages_2016_2.platform.webservices.netsuite.com"  xmlns:platformCore="urn:core_2016_2.platform.webservices.netsuite.com" 
xmlns:platformCommon="urn:common_2016_2.platform.webservices.netsuite.com" xmlns:tranSales="urn:sales_2016_2.transactions.webservices.netsuite.com"  xmlns:tranCust="urn:customers_2016_2.transactions.webservices.netsuite.com">
  <env:Header>
    <platformMsgs:tokenPassport>
      <platformCore:account>1234_SB1</platformCore:account>
        <platformCore:consumerKey>***FILTERED***</platformCore:consumerKey>
        <platformCore:token>***FILTERED***</platformCore:token>
        <platformCore:nonce>s975gqhodufgodiueroh</platformCore:nonce>
        <platformCore:timestamp>1531918396</platformCore:timestamp>
        <platformCore:signature algorithm="HMAC-SHA256">p0z56JDUsN+ksjhfe8HEhdEU(WJff7u+0Yee7Axk=
        </platformCore:signature>
    </platformMsgs:tokenPassport>
    <platformMsgs:preferences>
      <platformMsgs:ignoreReadOnlyFields>true</platformMsgs:ignoreReadOnlyFields>
    </platformMsgs:preferences>
  </env:Header>
  <env:Body>
    <platformMsgs:add>
      <platformMsgs:record xsi:type="tranCust:ReturnAuthorization">
        <tranCust:entity internalId="173436">
          <platformCore:name>C030420 John Thomas</platformCore:name>
        </tranCust:entity>
        <tranCust:itemList>
          <tranCust:item>
            <tranCust:id>21354</tranCust:id>
          </tranCust:item>
        </tranCust:itemList>
      </platformMsgs:record>
    </platformMsgs:add>
  </env:Body>
</env:Envelope>

如果有人可以提供任何指导,我们将不胜感激。

想通了,应该是。

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:platformMsgs="urn:messages_2016_2.platform.webservices.netsuite.com"  xmlns:platformCore="urn:core_2016_2.platform.webservices.netsuite.com" 
xmlns:platformCommon="urn:common_2016_2.platform.webservices.netsuite.com" xmlns:tranSales="urn:sales_2016_2.transactions.webservices.netsuite.com"  xmlns:tranCust="urn:customers_2016_2.transactions.webservices.netsuite.com">
  <env:Header>
    <platformMsgs:tokenPassport>
      <platformCore:account>1234_SB1</platformCore:account>
        <platformCore:consumerKey>***FILTERED***</platformCore:consumerKey>
        <platformCore:token>***FILTERED***</platformCore:token>
        <platformCore:nonce>s975gqhodufgodiueroh</platformCore:nonce>
        <platformCore:timestamp>1531918396</platformCore:timestamp>
        <platformCore:signature algorithm="HMAC-SHA256">p0z56JDUsN+ksjhfe8HEhdEU(WJff7u+0Yee7Axk=
        </platformCore:signature>
    </platformMsgs:tokenPassport>
    <platformMsgs:preferences>
      <platformMsgs:ignoreReadOnlyFields>true</platformMsgs:ignoreReadOnlyFields>
    </platformMsgs:preferences>
  </env:Header>
  <env:Body>
    <platformMsgs:add>
      <platformMsgs:record xsi:type="tranCust:ReturnAuthorization">
        <tranCust:entity internalId="173436">
          <platformCore:name>C030420 John Thomas</platformCore:name>
        </tranCust:entity>
        <tranCust:itemList>
          <tranCust:item>
            <tranCust:item internalId="22138" type="inventoryItem"/>
          </tranCust:item>
        </tranCust:itemList>
      </platformMsgs:record>
    </platformMsgs:add>
  </env:Body>
</env:Envelope>

您必须为此创建一个初始化。 因此,一旦创建了销售订单,我们就可以对其进行授权 Return,一旦它成功完成该过程。

更多信息:https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_N3508536.html

确保 SOAPAction 设置为初始化。