Skip to content


SuiteScript Tip 2. Deleting Cancelled/Voided Bills

One aspect of NetSuite I find bothersome is the treatment of Cancelled/Voided Bills. A Bill can be Voided by clicking the Void button in the Bill edit mode. Similarly, a Bill with the status Pending Approval can be Cancelled if its not approved by a supervisor. Canceling/Voiding a bill zeros out the amount and prevents the bill from any further modification. For strict accounting this is a good system that always leaves a paper trail.

The problem is that sometimes we don’t always want a paper trail. Usually for us this occurs when there is an error in the original Purchase Order that trickles into the Bill. Rather than having to change two records, I find it easier to go back to the original Purchase Order and re-bill it out. To do this, you would click ‘Delete’ when editing the Bill. However, if you clicked the wrong button or reserve the permission to delete bills to supervisors, you may end up with a Cancelled/Voided bill that you can not longer modify.

For these situations, I found that a quick and dirty SuiteScript edit will easily un-cancel/void the bill. To do this, I opened a JavaScript debug window when in the view screen, and entered the following quick snippet:

1
2
3
4
var rec = nlapiLoadRecord('vendorbill', [internal id# of Bill]);
//rec.setFieldValue('total', 0);
rec.setFieldValue('status', 'Open');
nlapiSubmitField(rec);

You can find the internal id of the bill in the address bar by looking for the id=

https://system.netsuite.com/app/accounting/transactions/vendbill.nl?id=100000&whence=&e=T

While I’m not quite sure what exactly you have to do to un-Cancel/Void the bill, I have tried setting the total to 0, and also setting the Status to Open. Both of these allow the Bill to be edited again. With this technique I am able to properly remove the erroneous and either duplicated or unnecessary, and then recreate the correct Bill. The biggest benefit of Deleting the Bill is to simplify the already verbose transactions history for my Vendors.

Posted in InDesign.

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

(required)

(required, but never shared)

or, reply to this post via trackback.