Good morning folks, anyone here use SOAP to apply ...
# suitetalkapi
a
Good morning folks, anyone here use SOAP to apply customer payments to invoices? I'm trying to process payments that may or may not have the invoice number associated with them, and if they do, the amount may or may not match the invoice amount. my question is regarding the index value in the CustomerPaymentApplyList. Is there a way to apply payment amounts to specific invoices by specifying only the invoice internal ID and the amount and let native netsuite do the rest? or do I have to specify the correct index every time? I'm getting a lot of "Unable to find a matching line for sublist apply with key: [doc,line] and value: [2350,0]" errors
b
are you using initialize
a
yep, from customer
b
you are supposed to initialize the customer payment, then go through the CustomerPaymentApplyList and mark the apply checkbox of the payments you want to apply to
a
and set amountSpecified to True? what I've seen so far is that it likes to apply the invoice amount and then total the payment amount to equal all the invoices, regardless of the amounts I specify for either.
b
im not sure what amountSpecified is
a
it's a true/false on the applylist. I'm just trying to get it to not ignore my amounts. 🙂
b
you can change the amount of the CustomerPaymentApply
a
I'll give True. BTW, you've been a life saver 🙂
b
im still not sure where you are getting amountSpecified, but the way to do this is to set the apply and amount fields on the CustomerPaymentApply
b
beware suiteanswers, neither the schema browser nor the xsd list an amountSpecified
a
I know but it's in the library in VB so might as well give it a try. so far it's been ignoring the amounts I set completely and just uses the invoice total. Haven't tried with the amountspecified just yet
@battk just a quick follow up. it looks like if you want to control how much is applied to each invoice when creating a payment, you have to set .amountSpecified = true on the apply list. similarly, if you want the payment not to default to the invoice totals you have to set paymentSpecified = true on the payment record.