The NetSuite File Cabinet allows all the special characters to be used in a file name, unlike standard file managers in Windows or Mac. However, it has a limit for the maximum number of characters allowed in a file name. According to NetSuite documentation, the best practice is to keep the file names under 100… Continue reading NetSuite File Cabinet filename character limit
Author: Derin Jose
Suitescript Function to fetch web-view links of files from a Shared Drive on the Google Drive storage using the file name
Suitescript function for fetching the web-view link of a file in a Shared Drive inside Google Drive using the file name. Please note that this only works when filenames are unique. /** * Function to get Google Drive link for a file * @param {string} accessToken Access token… Continue reading Suitescript Function to fetch web-view links of files from a Shared Drive on the Google Drive storage using the file name
How to create a Transfer Order in NetSuite through REST API call
We can create a Transfer Order in NetSuite through REST API request using the values: subsidiary, location, transferLocation, department, and item details. We can also provide a memo value if needed. Request Type: HTTPS POST Request URL: <https://<NetSuite> App Domain>.suitetalk.api.netsuite.com/services/rest/record/v1/transferOrder Headers: Content-Type: application/json Body: { “subsidiary”: { “id”: “<SUBSIDIARY INTERNAL ID>” }, “location”: { “id”:… Continue reading How to create a Transfer Order in NetSuite through REST API call
How to get Transfer Order details through REST API
We can get details of a transfer order in NetSuite through a REST API call: Request Type: HTTPS GET Request URL: <NetSuite App Domain>.suitetalk.api.netsuite.com/services/rest/record/v1/transferOrder/<Transfer Order Internal ID> Use parameter ‘?expandSubResources=true’ with the request to view all the related record details in the response. Make sure to add proper authentication values as well e.g: Request: GET… Continue reading How to get Transfer Order details through REST API
Custom NetSuite subtab UI that loads only when subtab is selected
We had a custom suitelet UI that was displayed inside a custom NetSuite subtab within an inline HTML field. This suitelet UI was used to show data from custom records related to the parent record. This was achieved using an ‘iFrame’ element with a ‘src’ value set as suitelet deployment link with parameter values sourced… Continue reading Custom NetSuite subtab UI that loads only when subtab is selected
How to convert base64 text to a PNG image file in NetSuite
Recently, the client requested a feature to send PNG image file content to Netsuite as base64 text so that it would be converted to an actual file and stored in the file cabinet. Here is a sample function I created to test the functionality: function createFileFromBase64(base64String){ try { var folderId = 47609; // Folder ID… Continue reading How to convert base64 text to a PNG image file in NetSuite
How to display a file in new browser tab using a download link
If you have a link to a file that can be used to download any file stored in cloud storage, you can use the same to render the file in a new browser tab in JavaScript. Following is a sample script to do the same: getFilePreview(fileURL, fileType) { console.log(“Inside… Continue reading How to display a file in new browser tab using a download link
How to install Node Package Manager(npm) for the logged-in user without admin access
Follow these steps to install npm for your logged-in user if you do not have admin access. – Download the stable npm package for the desired version from the [npm registry](https://registry.npmjs.org/npm/-/npm-{VERSION}.tgz). – Unzip the npm-{VERSION}.tgz package. – Open a command prompt and navigate to the unzipped npm folder. – Execute one of the following commands… Continue reading How to install Node Package Manager(npm) for the logged-in user without admin access
How to install Node.js for the logged-in user without admin access
Most installation methods for Node.js require the administrator password. But, if you don’t have admin access, you can manually install a specific Node.js version for your user without administrative privileges. Here are the steps: 1. Download Node.js Binary: – Visit the Node.js download page(https://nodejs.org/en/download/). – Choose the LTS (Long-Term Support) version that you want to… Continue reading How to install Node.js for the logged-in user without admin access
Sample map-reduce script to list all custom records with file attachments in NS account
The requirement was to find all the custom record types in the NetSuite accounts that have file attachments. The custom record type names were taken from the record types page. Here is a basic map-reduce script for listing all the custom records with file attachment count. I have also added code to save the result… Continue reading Sample map-reduce script to list all custom records with file attachments in NS account