• : 1-877-596-8218
  • : sales@aecc.ca
# # #
#

Tag: SuiteScript 2.0

How to create a button in NetSuite to open a saved search result

Challenge: Recently I did a customization for one of our customers, to create a SuiteLet to control/monitor the running of the Scheduled Script. One of their requirement is to have a button on the SuiteLet to open the saved search that selected on the page. Solution: The solution is simple and straightforward, if we know … Continue reading “How to create a button in NetSuite to open a saved search result”

How to Prevent User from Editing the Record — Using Client Side Script.

Challenge: Recently I did a customization for one of our customer, they want a Client Side Script that preventing certain fields from editing on the transaction record. The solution looks quite straightforward, using the validate field client side script and return false at the end. The Solution turned out to be incorrect and only works … Continue reading “How to Prevent User from Editing the Record — Using Client Side Script.”

Include Custom Module in NetSuite 2.0 Script.

The challenge: In SuiteScript 1.0, we can put the common use or shared functions into a script file and share it with multiple Script Record by defining this file as the Script Library Files. This increases the code reusability when writing the script, especially when designing a large project with multiple scripts working together. But … Continue reading “Include Custom Module in NetSuite 2.0 Script.”

Overcome saved search each() function limitation

How to overcome the each() function only loops over the first 4000 results for the saved search results in SuiteScript 2.0 Background: It’s quite common to use the search API in the suiteScript to get data from NetSuite database. We can create a search or load the saved search which is predefined in NetSuite. And … Continue reading “Overcome saved search each() function limitation”

SuiteScript 2.0.

Version 2.0 of SuiteScript allows developers to use modules to better structure their code. For example, you load a message module if you need to display a message at the top of the screen. There are two main functions in SuiteScript 2.0: define and require. When you use “define” the system loads all modules before … Continue reading “SuiteScript 2.0.”

How to create a NetSuite Custom Plugin using SuiteScript 2.0.

NetSuite provides a way the user can add their own plugin into system. Other scripts can instant the plugin and call the function in the plugin to avoid repeat codes. Let’s start from building a plugin and install it in the system We will build a plugin that find all the Sales Orders in the … Continue reading “How to create a NetSuite Custom Plugin using SuiteScript 2.0.”

Map/Reduce SuiteScript 2.0

In SuiteScript 1.0, the Scheduled Script is often used to do some scheduled work or bulk operations in the system such as bulk/periodic updating/creation records. SuiteScript 2.0 provides a more powerful way than the Scheduled script in API 1.0 with the Map/Reduce SuiteScript. Map/Reduce Script is a server side script that is capable to handle … Continue reading “Map/Reduce SuiteScript 2.0”

How to implement a suitelet with custom HTML code.

Here I’m going to describe a process on how to create a custom button that shows a page with a custom HTML code. The first step is to create a user event script that executes before the page is loaded. The following code shows an example of the implementation: function beforeLoad_showAllCustomers(type, form, request) { var … Continue reading “How to implement a suitelet with custom HTML code.”

How to implement a custom HTML (with integrated javascript) that uses restlet to get data.

To implement a custom html page in NetSuite you need to go through the following steps: 1) Create an HTML page with integrated javascript code: The code above shows the structure of the HTML page. Here we use AngularJS framework to communicate with the server restlet api. We use $http service to extract JSON data … Continue reading “How to implement a custom HTML (with integrated javascript) that uses restlet to get data.”