The following function can be used to sort an array of strings in descending order. /** * Sort array in descending order * @param {*} arr array to be sorted * @returns sorted array */ function sortDescending(arr) { arr.sort((a,… Continue reading Sort Array of strings in javascript
Author: Anjo Joseph
Function to convert a string to camel case
/** * This function is used to convert a string to camel case. * @param {string} str – The string to be converted to camel case. * @returns {string} The camel case version of the input string. */ const toCamelCase = (str) =>… Continue reading Function to convert a string to camel case
The function to adds a value to the first index of an array
/** * This function adds a value to the first index of an array. * @param {Array} arr – The array to which the value will be added. * @param {*} value – The value to add to the array. * @returns {Array} The modified… Continue reading The function to adds a value to the first index of an array
Function to add bar graph in a custom page developed using vue js
The following code can be used for adding the bar graph to the custom page using the chart.js library. /** * Renders a bar chart using Chart.js based on the provided chart data. * @param {Object} chartData – The data object containing labels, datasets, and other chart… Continue reading Function to add bar graph in a custom page developed using vue js
Add popup with close button in the HTML page
The following code can be used to show the popup with close button in the HTML page. HTML: <div class=”popup-container” id=”popupContainer”> <p id=”popupMessage”></p> <button id=”closeButton” class=”btn btn-secondary” onclick=”hidePopup()”>Close</button> </div> CSS: .popup-container { display: none; position: fixed; top: 50%; … Continue reading Add popup with close button in the HTML page
HTML and Javascript code to get csv file data from attach file input field as array of objects
The following code can be used to add the attach file input field in the custom page. Once the file attached, the data will be fetched from the attached csv file as array of objects. HTML: <!DOCTYPE html> <html> <head> <script src=”https://cdnjs.cloudflare.com/ajax/libs/PapaParse/5.3.0/papaparse.min.js”></script> </head> <body> <div class=”input-group”> <label class=”input-group-text”>Attach… Continue reading HTML and Javascript code to get csv file data from attach file input field as array of objects
Javascript function to call Suitelet from custom HTML page.
The following function can be used to call the NetSuite suitelet from JS attached to the Html page. /** * Function is used to process the import file * @param {*} fileObj object containing the file data * @param {*} legalEntityvalue legal entity value * @param {*} versionValue version value */ function processImportFile(fileObj, legalEntityvalue, versionValue)… Continue reading Javascript function to call Suitelet from custom HTML page.
Script and HTML to add the pagination to the table in the Custom HTML page
The following HTML, CSS, and javascript code can be used to add pagination to the table in the custom html page. Html: <div class=“m-4”> <table id=“example” class=“table table-hover”> <thead class=“table-dark”> <tr> <th>Account Number</th> <th>Account Name</th> <th>Account Description</th> <th>Version</th> <th>Is Template</th> </tr> </thead> <tbody id=“tableBody”> </tbody> </table> </div> <div id=“pagination-container”></div> CSS: #pagination-container { display: flex; justify-content:… Continue reading Script and HTML to add the pagination to the table in the Custom HTML page
Solve 0.01 amount discrepancy in invoices
While adding item lines in the invoice in NetSuite, the amount in the item line is modified automatically. The issue happens due to the “0.01 and Below” set in the “Tax Rounding Precision” field in the customer record. To prevent a 0.01 amount discrepancy in invoices and ensure accurate data, our initial step is to… Continue reading Solve 0.01 amount discrepancy in invoices
Proposal For Graphical Representation of Data in NetSuite
Proposal Summary The proposal for generating a report on a single custom page of the NetSuite. Requirement L+O Technologies aims to streamline the creation of Monthly Sales Operation Reports currently being manually generated in Excel for NetSuite. The goal is to automate the report generation process within NetSuite and incorporate graphical representations for a more… Continue reading Proposal For Graphical Representation of Data in NetSuite