compare Dates

Comparing the “date” element of each format and exclude any “time” element. Then with both dates converted to milliseconds, simply compare the values. You could do something like this. If dates are equal it returns 0, if the first date is less that the second then return -1, otherwise return 1. Javascript function compareDates(milliSeconds, dateString)… Continue reading compare Dates

Transferring Funds

A transfer is a movement of funds from one bank account to another bank account. In NetSuite, bank accounts include accounts for petty cash. NetSuite enables you to perform two types of bank transfers. You can transfer funds between two bank accounts if they share the same currency, and you can transfer funds between a… Continue reading Transferring Funds

Link a transfer order to a specific sales order in NetSuite

There are a few ways to link a transfer order to a specific sales order in NetSuite, even if the SKUs are not serialized. Option 1: Custom field You can create a custom field on the transfer order record to store the sales order number. Once the transfer order is received, you can use a… Continue reading Link a transfer order to a specific sales order in NetSuite

Gross Profit Calculation on Button click

 /**      * @description Function to check value      * @param {*} parameter      * @returns boolean      */     function checkForParameter(parameter) {         if (parameter !== “” && parameter !== null && parameter !== undefined && parameter !== false && parameter !== “null” && parameter !==… Continue reading Gross Profit Calculation on Button click

Automating Special Order Purchase Order Creation

NetSuite allows for the creation of purchase orders based on a sales order using SuiteScript. Special Order purchase orders, which are typically used for drop-ship transactions, can be automatically generated by leveraging SuiteScript’s record.create function. Below is an example script that demonstrates the process. var po_params = {   ‘recordmode’: ‘dynamic’,   ‘soid’: salesOrderIdICPO, // Sales order… Continue reading Automating Special Order Purchase Order Creation

Currency conversion Suitescript using Currency Module

currency.exchangeRate : Enter an exchange rate for this currency against the base currency of this company, or if you use OneWorld, for this currency against the base currency of the root parent subsidiary. For example, if your company is located in Canada and you are defining the U.S. dollar, and the current exchange rate is… Continue reading Currency conversion Suitescript using Currency Module

Expense Allocation

Introduction Expense allocations in NetSuite provide a powerful way to automate the distribution of expenses across multiple departments, locations, or other segments within your organization. This feature is essential for companies looking to streamline their financial processes, ensure accurate reporting, and maintain compliance with internal accounting policies. What is Expense Allocation? Expense allocation refers to… Continue reading Expense Allocation

Invalid type NaN, use Date” Error When Using N/format

Introduction When working with the N/format module in NetSuite, you may sometimes encounter the error: “Invalid type NaN, use Date” This error typically occurs when trying to format a value that is not recognized as a valid Date object. It usually happens when passing an undefined, null, or incorrectly formatted string instead of a proper… Continue reading Invalid type NaN, use Date” Error When Using N/format

Delete a branch in GitLab

When working with Git, it’s common to create branches to isolate changes and work on new features or fixes. However, once a branch has served its purpose, it’s often necessary to delete it to keep your repository clean and organized. In this article, we’ll see the process of deleting a Git branch using Git commands… Continue reading Delete a branch in GitLab

Add and Push an Existing Project to GitLab

Pushing an existing local project to GitLab involves several steps to initialize Git, connect to a remote repository, and upload your files. Here’s a concise guide to help you through the process: 1. Create a New Repository on GitLab: Log in to your GitLab account. Click on the “New Project” button. Choose “Create blank project”.… Continue reading Add and Push an Existing Project to GitLab