HOW TO INCLUDE HTML AND CSS IN SUITELET SCRIPT?

HOW TO INCLUDE HTML AND CSS IN SUITELET SCRIPT?

As a NetSuite Solution Provider this thime we will tell you about Suitelets.Suitelets are of two types- Front end and Back end. Front end suitelet is used for creating forms, assistants etc. Sometimes netsuite solution provider can’t create the UI by using only Netsuite API’s. We might have to use html and css to build the page. The following ocde shows how it can be done:var html = ‘<!DOCTYPE html>n’
+'<html>n’
+'<head>n’
+'<link href=”https://system.netsuite.com/core/media/media.nl?id=1234&_xt=.css” rel=”stylesheet”
Read the rest

USING NETSUITE API nlapiSetCurrentLineItemMatrixValue

There are many api’s in Netsuite which are not frequently used in customization’s but has lot of importance.

Feel free to reach your NetSuite Solution Provider , TheSmilingCoders for proper netsuite implementationnetsuite consultation , netsuite customizationnetsuite Support,netsuite Training, nlapiSetCurrentLineItemMatrixValue can be used to set the price of an item in the item record. This cannot be achieved by using the api nlapiSetLineItemValue.

The following code can used with or

Read the rest

USER EVENT SCRIPT 2.0 TO LOAD A RECORD, READ IT’S VALUE AND SET A FIELD VALUE

Below code loads a sales order, reads it’s sublist values and sets value of a custom field.

/**
 *@NApiVersion 2.x
 *@NScriptType UserEventScript
 */
define([‘N/record’,’N/log’], // modules used
    function(record,log) {
   
        function afterSubmit(context) {
            if (context.type !== context.UserEventType.DELETE)
            {
           
                     var rec_id

Read the rest

HOW TO CREATE A FULL CALENDAR IN NETSUITE USING SUITELET?

A full calendar can be built in netsuite using suitelet script. This would require you to first download the zip file from https://fullcalendar.io/download.

Place this file at file cabinet and note down the url of fullcalendar.min.css, fullcalendar.print.min.css, /lib/moment.min.js, /lib/jquery.min.js, fullcalendar.min.js.

You can also create a client script and refer that url in html link ref, so that it can be triggered when user selects a date.

Below is the sample code: replcae the link url with your url

 var html =

Read the rest

HOW TO CREATE SUITELET ASSISTANT IN NETSUITE?

Creating a suitelet assistant involves the following steps:

1) Create the assistant.

2) Create steps.

3) Attach client script to validate data on page init, field change, save ( when user clicks on next or finish) or any other trigger function supported by client script.

4) Build pages for each step. (Get Function)

5) Set values for fields

6) Set up the action when user clicks on next, cancel, back or finish. (Post function)




1)

Read the rest

PROCURE TO PAY FLOW IN NETSUITE- NETSUITE ACADEMY

Procure to Pay involves the following steps in Netsuite

1) Create Purchase Order.

2) Approve Purchase order.

3) Create Item Receipt.

4) Create Vendor bill.

5) Create Vendor Payment.

Read the rest

ORDER TO CASH FLOW IN NETSUITE – NETSUITE ACADEMY

Order to Cash flow in Netsuite involves the following:

1) Create Sales Order

2) Approve Sales Order

3) Create Fulfilment record for the sales order. This involves pick, pack and ship

4) Create Invoice

5) Create Customer Payment record.

Read the rest

WHY CLIENT SCRIPT DOESN’T EXECUTE SOMETIMES IN NETSUITE? – NETSUITE ACADEMY

Client script sometimes executes using old code and not the updated code. To resolve this, cache needs to be cleared. Cache can be cleared Once cache is cleared from the browser, you can login to the account again and execute the code. Now, the latest version of the code will get executed.

-Netsuite Academy

Read the rest

USING CASE (IF AND ELSE) IN NETSUITE SAVED SEARCH- NETSUITE ACADEMY

While creating a saved search in Netsuite, you want encounter a situation where you want have to display a value depending on some conditions. Such scenarios can be implemented by using sql CASE syntax in the formula field. For eg, in a transaction search, if you want to display a value depending on the transaction type, then you can add a formula text field in coulmn and use CASE as given below:

CASE WHEN {type}=’Invoice’

Read the rest

Work Around the 1000 Row Limit Returned by Saved Searches in Netsuite

nlapiSearchRecord can return only upto 1000 rows. But there is a work around to retrieve more than 1000 rows. This can be done by first sorting the result based on internal id and then using while loop and use concat method to get all results by internalid number as a filter inside the while loop. The sample code is given below:

var filters = new Array();

filters[1] = new nlobjSearchFilter(‘mainline’,null,’is’,’T’);

var columns = new Array();
Read the rest