Hi, vendor bill tax code question here. For one ...
# ask-stanley-ai
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, (edited)
c
AI generated answer (using internal Slack threads):
Based on the conversations, it appears that the REST API does not support setting the tax code for vendor bills in NetSuite instances using legacy tax. This is a known limitation of the REST API, as it does not support legacy tax features. To work with taxation through REST web services, the SuiteTax feature must be enabled. However, enabling SuiteTax may not be an option for all clients. In such cases, there are a few potential workarounds: 1. Use SOAP API: The SOAP API does support setting the tax code for vendor bills. However, it's important to note that SOAP is being deprecated and will be removed by 2028. 2. Use SuiteScript: SuiteScript can be used to set the tax code. This could involve creating a user event script that sets the tax code on the lines before submit. However, this approach may not be ideal if your product/app is entirely based around SuiteTalk APIs. 3. Use a custom restlet: You could create the vendor bill record via REST API without tax details, then use a custom restlet to add the tax details. This approach would still allow you to use JSON. 4. Use a combination of Before Load and After Submit: You could add a default tax code value with Before Load, send the desired tax code in a custom field, and copy it over with an After Submit. Please note that these are potential workarounds and may not be suitable for all situations. It's recommended to thoroughly test any solution before implementing it in a production environment. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.880249143
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.86517334
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.86352545
Please provide your feedback on this answer.