Hi, vendor bill tax code question here. For one ...
# integrations
p
Hi, vendor bill tax code question here. For one client, we are setting a default taxCode on the vendor bill items (lines). We did this because they have a Canadian NetSuite instance and were getting the error please enter value(s) for tax code and it solved the problem for them using the SOAP API. SOAP is being deprecated and I'm trying to migrate to REST. You cannot set a taxCode with REST as there is no such property: https://system.netsuite.com/help/helpcenter/en_US/APIs/REST_API_Browser/record/v1/2025.2/index.html#/definitions/vendorBill What solutions are there? The client does not want to set up a default tax code for every vendor. We could set up a default purchaseTaxCode or taxSchedule with SOAP to create and update the otherChargePurchaseItems potentially, but also need to quit using SOAP for that so that seems like a bad option. We could add a beforeSubmit userevent script on the client's account to set the tax codes on the lines, but would really rather avoid this since our product/app is entirely based around SuiteTalk APIs. Is there any better solution? Is there any way to make this work with REST or some more automated setup within the client's account other than them manually adding tax code to every vendor? Thanks,
b
Your suitescript solution doesnt work, validation of mandatory fields happens before the before submit entry point
p
any ideas on what a good solution would be? and are you sure? We did this exact method with a beforesubmit user event script to automatically set a tax schedule on an otherchargepurchaseitem where the tax schedule was required and triggering the required field error, since REST doesn't allow you to do this either.
correction, it is actually a beforeLoad SuiteScript, not beforeSubmit that allows us to auto set tax schedule when creating an otherChargePurchaseItem with the REST API. REST API will not allow us to set the tax schedule field, even though they're kicking everyone off SOAP and most clients are still using legacy tax, which requires the tax schedule. 🤔