Hi Team,
We try to push a payment from our application to NetSuite via API, but NetSuite returns the following error:
<platformCore:message>Unable to find a matching line for sublist apply with key: [doc,line] and value: [473882,0].</platformCore:message>
You can see our request:
-<soapenv:Body>
-<add xmlns="urn:messages_2020_1.platform.webservices.netsuite.com">
-<record xmlns:ns8="urn:customers_2020_1.transactions.webservices.netsuite.com" externalId="" xsi:type="ns8:CustomerPayment">
<ns8:customer type="customer" xsi:type="ns9:RecordRef" xmlns:ns9="urn:core_2020_1.platform.webservices.netsuite.com" internalId="58595"/>
<ns8:currency type="currency" xsi:type="ns10:RecordRef" internalId="1" xmlns:ns10="urn:core_2020_1.platform.webservices.netsuite.com"/>
<ns8:payment xsi:type="xsd:double">5</ns8:payment>
<ns8:tranDate xsi:type="xsd:dateTime">2021-10-14T20:27:01.000Z</ns8:tranDate>
<ns8:paymentMethod type="paymentMethod" xsi:type="ns11:RecordRef" internalId="2" xmlns:ns11="urn:core_2020_1.platform.webservices.netsuite.com"/>
<ns8:memo xsi:type="xsd:string"></ns8:memo>
<ns8:chargeIt xsi:type="xsd:boolean">false</ns8:chargeIt>
<ns8:ccApproved xsi:type="xsd:boolean">true</ns8:ccApproved>
<ns8:undepFunds xsi:type="xsd:boolean">true</ns8:undepFunds>
-<ns8:applyList xsi:type="ns8:CustomerPaymentApplyList" replaceAll="true">
-<ns8:apply xsi:type="ns8:CustomerPaymentApply">
<ns8:doc xsi:type="xsd:long">523085</ns8:doc>
<ns8:line xsi:type="xsd:long">0</ns8:line>
<ns8:type xsi:type="xsd:string">invoice</ns8:type>
<ns8:currency xsi:type="xsd:string">USD</ns8:currency>
<ns8:disc xsi:type="xsd:double">0.0</ns8:disc>
<ns8:amount xsi:type="xsd:double">5154.57</ns8:amount>
</ns8:apply>
</ns8:applyList>
</record>
</add>
</soapenv:Body>
</soapenv:Envelope>
Question is:
In specification we found the recommendation to use an A/R account in request.
Is the A/R account a mandatory field?
In which cases we should add an A/R account to the request?
Where we can take this A/R account (take it from invoice, customer or some where else)?
We are sending the same request to another customer, and everything works great. What can be the reason in this case?
We tried to remove <ns8:line xsi:type="xsd:long">0</ns8:line>, but still the same issue.