Are you ever viewing long transaction lists in NetSuite and wish you could freeze the panes like in excel? Well this blog will help give you that “excel” feature in NetSuite.
By installing a popular userscript manager to your preferred web browser and enabling the code below, you freeze the column header lines in Sales Orders, Purchase Orders, Journal Entries, Item Fulfillments, Item Receipts, etc. This is extremely useful if you have long record lists.
Below are the steps and the examples of how the userscript works.
*******************
Copy and paste code below into user script manager*:
// ==UserScript==
// @name NetSuite Floating Headers
// @version 0.2
// @description Float item sublist header on scroll
// @match https://*.netsuite.com/*
// grant none
// @require http://code.jquery.com/jquery-latest.js
// ==/UserScript==
(function ($, undefined) {
$(function () {
const windowHeight = $(window).height();
$(‘.uir-machine-table-container’)
.filter((index, elem) => $(elem).height() > windowHeight)
.css(‘height’, ’70vh’)
.bind(‘scroll’, (event) => {
const headerElem = $(event.target).find(‘.uir-machine-headerrow’);
headerElem.css(‘transform’, `translate(0, ${event.target.scrollTop}px)`);
})
.bind(‘scroll’, (event) => {
const headerElem = $(event.target).find(‘.uir-list-headerrow’);
headerElem.css(‘transform’, `translate(0, ${event.target.scrollTop}px)`);
})
});
})(window.jQuery.noConflict(true));
*******************
Step #1:
Download a trusted userscript manager. If you are unsure which one to download, contact your internal IT support for appropriate suggestions.
Step #2:
Once downloaded, open up the userscript manager and “Create a new script…”
If code appears, delete the code. Next, copy and paste in the new code in Bold above. Your new script should look like the below screenshot.
After populating the new script, make sure to save your changes.
Step# 3:
Once saved, please close out of your browser completely and re-open. Before you login to NetSuite, you might have to make sure the script is enabled by opening the userscript manager and enabling it. Make sure it says that NetSuite Floating Headers is on. When you are logged into NetSuite, you will notice some userscript managers have an indicator to let you know that that the script is running (red notification on the icon in this case).
Step #4:
My example is a Purchase Order with 23 lines.
The screenshot below is the native NetSuite look without the floating headers when the script is not enabled. As you see the column headers are fixed and there is only one vertical scroll bar.
As you scroll, the column headers vanish from view. If you would like to know the column header, you would have to scroll up and down to view it. This can get very annoying.
When “NetSuite Floating Headers” is enabled through the userscript manager, the below feature occurs. Notice there is an additional vertical scroll bar and the column headers float over the lines as you scroll.
This quick and easy setup can save you hours and hours of frustration. If you need help with the configuration or have any questions feel free to contact me netsuite@rsmus.com.
*Special thanks to Ryan Morrissey, at NetSuite, author of original script