Hello <@U5TF1GQ20> I need you help. I send a req...
# suitetalkapi
a
Hello @battk I need you help. I send a request to NetSuite so that to create a payment. -<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-14T202701.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> But NetSuite returns the following error message: Unable to find a matching line for sublist apply with key: [doc,line] and value: [523085,0] In the request I send all data that added on the UI for payment. Could you clarify, what is the reason of this error message?
c
Have you checked that the document number and line are correct? Don't think you need the line no. Battk can probably confirm
a
I sent a request without <ns8:line xsi:type="xsd:long">0</ns8:line> and received the same error massage. How I can check that the document number and line coincide?
c
Go to the invoice in the UI, and then add
&xml=T
to the end of the URL - that dumps the record so that you can look
a
Yes, the document number coincides. <record recordType="invoice" id="523085" perm="4" But the line number doesn't coincide In the request line = 0 In the dump <line>1</line> Maybe it is a reason?
b
initialize the customer payment
a
@battk Could you clarify, is it possible that the reason in the line number?
b
then find the matching keys
the answer is that it doesnt really matter, you should only be matching against the initialized payment
and only set the fields that you want to change
and the keys
a
It is a strange case because we use this request for all payments, and this issue only with one Customer
And we cannot understand what is the difference in comparative with other customers
on UI everything the same
@battk Could you recommend what we should change except these specifications? Maybe you have a solution
b
what does the initialized customer payment look like
a
In the specification Use the arAccount parameter to specify the accounts receivable (AR) account in a Customer to Customer Payment initialization. (This parameter is define in InitializeAuxRefType.)
@battk How to add this parameter in the request?
b
its optional, but its an element of the initialize element
whatever tool you are using for soap should have generated an object with the auxReference
if you are generating soap by hand, then you want to find how the InitializeRecord is defined in the core.xsd