Seeing if anyone has successfully used the SOAP to...
# general
b
Seeing if anyone has successfully used the SOAP to create a payment record and apply the a credit memo within that created document type. I've been able to successfully connect the Invoices but when attempting the credit memo's having no luck. If anyone has an example that has been able to if you can share that would be amazing!
b
what does your request look like
b
Request: <?xml version="1.0"?> <soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/ xmlns:xsd=http://www.w3.org/2001/XMLSchema xmlns:ns1="urn:customers_2022_2.transactions.webservices.netsuite.com" xmlns:ns2="urn:core_2022_2.platform.webservices.netsuite.com" xmlns:ns3="urn:common_2022_2.platform.webservices.netsuite.com" xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance> <soapenv:Header> <ediHqTransId>239b9397-d38a-450b-8e83-dcbac3c1a724</ediHqTransId> <preferences mustUnderstand = "0" actor = http://schemas.xmlsoap.org/soap/actor/next> <useConditionalDefaultsOnAdd>true</useConditionalDefaultsOnAdd> <ignoreReadOnlyFields>true</ignoreReadOnlyFields> <warningAsError>false</warningAsError> <disableMandatoryCustomFieldValidation>true</disableMandatoryCustomFieldValidation> <disableSystemNotesForCustomFields>true</disableSystemNotesForCustomFields> </preferences> </soapenv:Header> <soapenv:Body> <add xsi:type='platformMsgs:AddRequest'> <record xsi:type='tranCust:CustomerPayment' xmlns:tranCust="urn:customers_2022_2.transactions.webservices.netsuite.com"> <customer xsi:type='platformCore:RecordRef' internalId = "667"/> <payment xsi:type='xsd:double'>219536.13</payment> <account xsi:type='platformCore:RecordRef' internalId = "403"/> <tranCust:creditList replaceAll = "true" xsi:type='tranCust:CustomerPaymentCreditList'> <tranCust:credit> <tranCustapply&gt;true&lt;/tranCustapply> <tranCustdoc&gt;20657998&lt;/tranCustdoc> <tranCustline&gt;0&lt;/tranCustline> <tranCustcreditDate&gt;2024 04 05T000000.000 0700</tranCust:creditDate> <tranCust:type>Credit Memo</tranCust:type> <tranCustrefNum&gt;CM KW8351&lt;/tranCustrefNum> <tranCustcurrency&gt;USA&lt;/tranCustcurrency> <tranCustamount&gt;200.00&lt;/tranCustamount> </tranCust:credit> </tranCust:creditList> </record> </add> </soapenv:Body> </soapenv:Envelope>
Error: <platformCore:statusDetail type="ERROR"> <platformCorecode&gt;USER ERROR&lt;/platformCorecode> <platformCore:message>Unable to find a matching line for sublist credit with key: [doc,line] and value: [20657998,0].</platformCore:message> </platformCore:statusDetail>
b
make sure you understand how Updating Sublists in SOAP Web Services
your error is relating to being unable to match keys
else you can use the initialize operation to see what the apply/credit sublist looks like so you know what you can and cannot match