Guys have anyone did any projects pushing Check re...
# integrations
s
Guys have anyone did any projects pushing Check records into netsuite via web services?
b
too generic
expect to share the actual error message and code
preferably with the request you used
s
Request below please
<soapenv:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Header> <ns1:tokenPassport soapenv:mustUnderstand="0" soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" xmlns:ns1="urn:messages_2021_1.platform.webservices.netsuite.com"> <ns2:account xmlns:ns2="urn:core_2021_1.platform.webservices.netsuite.com"></ns2:account> <ns3:consumerKey xmlns:ns3="urn:core_2021_1.platform.webservices.netsuite.com">****************************************************************</ns3:consumerKey> <ns4:token xmlns:ns4="urn:core_2021_1.platform.webservices.netsuite.com">****************************************************************</ns4:token> <ns5:nonce xmlns:ns5="urn:core_2021_1.platform.webservices.netsuite.com">2c2387b1ba814820a2ad5fb97359cf7a</ns5:nonce> <ns6:timestamp xmlns:ns6="urn:core_2021_1.platform.webservices.netsuite.com">1644540041</ns6:timestamp> <ns7:signature algorithm="HMAC-SHA256" xmlns:ns7="urn:core_2021_1.platform.webservices.netsuite.com">********************************************</ns7:signature> </ns1:tokenPassport> </soapenv:Header> <soapenv:Body> <add xmlns="urn:messages_2021_1.platform.webservices.netsuite.com"> <record xsi:type="ns8:Check" xmlns:ns8="urn:bank_2021_1.transactions.webservices.netsuite.com"> <ns8:account xsi:type="ns9:RecordRef" type="account" internalId="1078" xmlns:ns9="urn:core_2021_1.platform.webservices.netsuite.com"/> <ns8:entity xsi:type="ns10:RecordRef" type="vendor" internalId="1655" xmlns:ns10="urn:core_2021_1.platform.webservices.netsuite.com"/> <ns8:subsidiary xsi:type="ns11:RecordRef" type="subsidiary" internalId="3" xmlns:ns11="urn:core_2021_1.platform.webservices.netsuite.com"/> <ns8:expenseList xsi:type="ns8:CheckExpenseList" replaceAll="false"> <ns8:expense xsi:type="ns8:CheckExpense"> <ns8:account xsi:type="ns12:RecordRef" type="account" internalId="236" xmlns:ns12="urn:core_2021_1.platform.webservices.netsuite.com"/> <ns8:amount xsi:type="xsd:double">60.0</ns8:amount> </ns8:expense> </ns8:expenseList> </record> </add> </soapenv:Body> </soapenv:Envelope>
Response below
<soapenv:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Header> <platformMsgs:documentInfo xmlns:platformMsgs="urn:messages_2021_1.platform.webservices.netsuite.com"> <platformMsgsnsId&gt;WEBSERVICES &lt;/platformMsgsnsId> </platformMsgs:documentInfo> </soapenv:Header> <soapenv:Body> <addResponse xmlns="urn:messages_2021_1.platform.webservices.netsuite.com"> <writeResponse> <platformCore:status isSuccess="false" xmlns:platformCore="urn:core_2021_1.platform.webservices.netsuite.com"> <platformCore:statusDetail type="ERROR"> <platformCorecode&gt;INVALID KEY OR REF&lt;/platformCorecode> <platformCore:message>Invalid entity reference key 1655.</platformCore:message> </platformCore:statusDetail> </platformCore:status> </writeResponse> </addResponse> </soapenv:Body> </soapenv:Envelope>
@battk Thanks for coming backl
when i give a employee Internal ID in the entity field its creating the check
but when i use vendor Internal ID its giving me above error
b
existence of a vendor is not enough to select it as the entity
general rule is to create the check in the ui using the same role and employee
if you cant do it in the ui, you wont be able to do it via other methods
s
I can select the same vendor in UI and create a check record
b
get that check you created and compare it to the request you are sending
s
yeah i did that
still no use
b
usual causes for the issue are classification issues
which are things like subsidiary preventing your role from selecting your vendor
or the vendor being inactive
both are things usually uncovered by creating the transaction in the ui
s
I'm using admin role and checked the Bank account, Vendor, Expense account Subsidiaries, they all sharing same sub
and i m only populating few fields as mentioned above
no classification yet
b
the only thing that i would emphasize at this point is to make sure that the tokens you are using for your integration are the same you are using in the ui
though its generally frowned upon to use an administrator for an integration, usually you want a role with as few permissions as possible
s
Ok cool
i will recheck this again
Thanks for your time and appreciate that