does anyone know if you can use the external ID in...
# integrations
n
does anyone know if you can use the external ID in the "apply" sublist on a credit memo through SOAP?
@battk
b
no, there is no sublist key that uses external id
n
dang then how do we need to do an extra call to get the internalid?
is there another field we can use
b
pick a choice for sublist key most convenient to you
n
like the refNo?
is there anything additional we need to do "pick a key"
aka in the SOAP request
b
my answers rarely make sense without reading the linked documentation
😂 1
r
Fwiw this was not on a Credit Memo, so maybe it has different requirements, but we were able to do this on a vendor payment by using the following string.
Copy code
[ { "amount": 116246.4125, "apply": true, "doc": { "externalId": "our_external_id" } } ]
Worth trying. I know NS would never have their documentation behind to where something worked that wasn't documented as such, but would probably be worth taking 15 mins to try it if it can save you a bunch of time.
n
lmao
thank you!
👍 1
java.lang.NumberFormatException: For input string: “Invoice-CreditMemo-TEST-2024-08-14
b
its a data type thing
@RJMNS solution works for rest since the doc is a nsResource, while for soap, its a long
dont expect to be able to use something from a different integration method
r
It worked for us on SOAP. If it's not supposed to, I have no idea why it did. I'm only semi-technical. 🤷‍♂️
To that point ☝️ @Nicolas Bean, I don't have any help with you on that error. I'm sure @battk knows more than I do about it. We had more technical people than I help us set this stuff up.
n
no worries i appreciate it
r
Fwiw I got curious and looked at our actual SOAP request and I see it's using Internal ID. I forgot to mention that the little snippet of code I posted is not something used in a direct request, we're feeding it through a middleware platform. So probably @battk and I are both right..ha. They're right in that this doesn't really work with SOAP, but I'm guessing it works for us because the middleware platform under the covers is taking the Ext ID we're giving it and doing some lookup process invisible to the user to take that Ext ID and find the corresponding Int ID before it submits the SOAP request. Doesn't help your problem, but in case anyone cares.
n
ah
i figured thank you