intacct-sdk-js
intacct-sdk-js copied to clipboard
Error with AccountsReceivable.CustomerUpdate but not in XML API
I am attempting to follow the example to update a customer record to simply change the "comments" field via the example provided here https://github.com/Intacct/intacct-sdk-node-js-examples/blob/master/crud-customer.js
However it keeps throwing "BL04002055 Smart Rule CUST_REQ_TAXABLE Violated The Taxable field (Additional info tab) must be checked. [Support ID: 7lGI7EB030%7EYTuKDP0g2Pw--dgW6G9JxgAAAAI]". I'm not setting TAXABLE or any fields that would affect this smart rule. And this does not error when I use the Update Customer XML API directly.
My code
const updateFn = new IA.Functions.AccountsReceivable.CustomerUpdate();
updateFn.customerId = 'TESTCUSTOMER',
updateFn.comments = 'test - ' + Math.floor(Math.random() * 1000);
const updateRes = await client.execute(updateFn);
However, following the documentation here https://developer.intacct.com/api/accounts-receivable/customers/#update-customer I'm able to successfully update the customer as expected using the raw XML request in postman. Confirmed by checking the comments field on the record after executing the call.
<function controlid="testFunctionId">
<update>
<CUSTOMER>
<CUSTOMERID>TESTCUSTOMER</CUSTOMERID>
<COMMENTS>test - 1234</COMMENTS>
</CUSTOMER>
</update>
</function>
ALSO why does the CustomerUpdate() function not support being able to reference customer by RECORDNO when either RECORDNO or CUSTOMERID is supported in the XML API?