How to automate the creation of reversal journals in NetSuite
In this guide, we’ll walk you through how to automate creating reversal journals in NetSuite to keep your books clean. Instead of relying on manual processes, we’ll help you ensure that temporary balances (such as accruals, clearing entries, or expected bank transactions) are automatically reversed the next business day.
Auto-reversal journals are most valuable when:
Handling timing differences when you expect transactions (e.g., bank debits or credits) to settle the next day.
Keeping your general ledger balances accurate without extra manual work.
You post accruals that should clear the following day.
In this guide, we’ll create:
A Saved Search on the Transaction record for the accounts you want to post accruals to.
A Scheduled Script to generate the journal entry automatically.
How to create a Saved Search to fetch account balances
In your NetSuite Account, Go to Lists > Saved Search > New.
Now, Select Transaction as the record type.
Enter a Name and ID, and set it to Public.
Important Note📝: Write down the ID of the saved search once it is saved. We will use it later in the scripting stage.
Next, add the search criteria. Go to the Criteria tab in your saved search and enter the following filters:
Date -> on or before today
Main Line -> Yes
Posting -> Yes.
Account -> Add all the accounts where you want to post accruals at the end of the day.
Next, we will configure the search results. Go to the Results tab, click Remove All to clear unnecessary columns, and then add the following fields.
Amount(Foreign Currency), Summary Type: Sum
Amount, Summary Type: Sum
Account, Summary Type: Group
Currency, Summary Type: Group
Save.
🎉 Great work! You’ve just created a Saved Search that pulls the balances of accounts for all transactions dated today or earlier.
How to create a scheduled script to create reversal journal
Download create_reversal_journal.js from this repo.
Open the file in any text editor and update the saved search ID on line number 8 (this is the one you noted earlier when creating the saved search). Save the file.
const SAVED_SEARCH_ID = ‘customsearch4521’;Open NetSuite. Click on Customization > Scripting > Scripts > New.
Click the plus (+) icon next to the Script File field.
Enter a name and upload the script file you downloaded and edited.
Click Create Script Record, it should take you to the next screen where we will enter all the script details.
Enter a name.
On the Parameters tab, set Label = Recon Account, Type = List/Record, and List/Record = Account. We’re creating this parameter to define the offset account, which will hold the offset balance to keep other accounts in balance.
Click Save
Kudos!!🎉 You’ve just created a schedule script with a parameter. This script will post accruals at the end of the day to keep the books clean.
Note: Before we schedule the script, we need to set the ID of the parameter in the code.
On the parameters tab, copy the ID of the parameter we created.
On the scripts tab, click edit and update this ID on line number 13.
How to schedule the script to run daily
On the script record page, click Deploy Script.
Enter a title. Set Status to Scheduled and Log Level to Debug/Audit.
On the Schedule tab, check Daily Event, set Repeat = Every 1 Day, and define the Start Time based on when no more bank transactions are expected.
In the Parameters tab, select the recon account which should hold the offset balance.
Click Save.
🎉 Congratulations! You’ve just automated reversal journal creation at the end of the day, making sure your accounts stay balanced and your financial reports remain clean and accurate.



















