Web Services SuiteTalk -创建项目接收的问题

nimxete2  于 2022-11-15  发布在  其他
关注(0)|答案(1)|浏览(111)

我一直致力于与NetSuite的“某种”集成。我们使用Suitetalk/SOAP Web服务来拉和推一些数据,只是一些基本的东西,因为我不是NetSuiteMaven。
从Netsuite中提取数据并只推送(添加)vendorBill的过程一直运行良好。
但后来我被要求添加(创建)采购订单和itemReceipts。
我已经成功创建了采购订单,但在尝试创建itemReceipt时遇到了困难。当我将其发送到Netsuite时,我收到错误消息“不允许向子列表费用添加新行。"
下面是请求和响应xml。
有人能帮我找出我做错了什么吗?缺少了什么?
非常感谢。干杯。

请求

<?xml version="1.0"?>

-<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

-<soap:Header>

-<preferences xmlns="urn:messages_2019_1.platform.webservices.netsuite.com">

<warningAsError>false</warningAsError>

<ignoreReadOnlyFields>true</ignoreReadOnlyFields>

</preferences>

-<tokenPassport xmlns="urn:messages_2019_1.platform.webservices.netsuite.com">

<account xmlns="urn:core_2019_1.platform.webservices.netsuite.com">1111111_SB1</account>

<consumerKey xmlns="urn:core_2019_1.platform.webservices.netsuite.com">****************************************************************</consumerKey>

<token xmlns="urn:core_2019_1.platform.webservices.netsuite.com">****************************************************************</token>

<nonce xmlns="urn:core_2019_1.platform.webservices.netsuite.com">1111100</nonce>

<timestamp xmlns="urn:core_2019_1.platform.webservices.netsuite.com">11111899</timestamp>

<signature xmlns="urn:core_2019_1.platform.webservices.netsuite.com" algorithm="HMAC-SHA1">****************************</signature>

</tokenPassport>

</soap:Header>

-<soap:Body>

-<add xmlns="urn:messages_2019_1.platform.webservices.netsuite.com">

-<record xmlns:q1="urn:purchases_2019_1.transactions.webservices.netsuite.com" xsi:type="q1:ItemReceipt">

<q1:entity type="vendor" internalId="19918834"/>

<q1:subsidiary internalId="15"/>

<q1:createdFrom type="purchaseOrder" internalId="28854986"/>

<q1:tranDate>2020-01-31T08:21:38.7482415Z</q1:tranDate>

<q1:memo>test memo</q1:memo>

<q1:currency type="currency" internalId="1"/>

-<q1:itemList>

-<q1:item>

<q1:itemReceive>true</q1:itemReceive>

<q1:item type="inventoryItem" internalId="1238"/>

<q1:location type="location" internalId="26"/>

<q1:quantity>1</q1:quantity>

<q1:rate>200</q1:rate>

</q1:item>

</q1:itemList>

-<q1:expenseList>

-<q1:expense>

<q1:markReceived>true</q1:markReceived>

<q1:account>117</q1:account>

<q1:amount>0</q1:amount>

</q1:expense>

</q1:expenseList>

</record>

</add>

</soap:Body>

</soap:Envelope>

回应

<?xml version="1.0"?>

-<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

-<soapenv:Header>

-<platformMsgs:documentInfo xmlns:platformMsgs="urn:messages_2019_1.platform.webservices.netsuite.com">

<platformMsgs:nsId>WEBSERVICES_1111111_SB1_013120208906514922222545436_466a0e814</platformMsgs:nsId>

</platformMsgs:documentInfo>

</soapenv:Header>

-<soapenv:Body>

-<addResponse xmlns="urn:messages_2019_1.platform.webservices.netsuite.com">

-<writeResponse>

-<platformCore:status xmlns:platformCore="urn:core_2019_1.platform.webservices.netsuite.com" isSuccess="false">

-<platformCore:statusDetail type="ERROR">

<platformCore:code>USER_ERROR</platformCore:code>

<platformCore:message>Adding new line to sublist expense is not allowed.</platformCore:message>

</platformCore:statusDetail>

</platformCore:status>

</writeResponse>

</addResponse>

</soapenv:Body>

</soapenv:Envelope>
4nkexdtk

4nkexdtk1#

有点晚了,但任何人都发现自己在这里。这是因为订单行没有提供。如果你不提供它NS认为你正在创建一个新的行,你是不应该这样做的。

相关问题