How to read current record in a custom module in SuiteScript 2.0

 * @NApiVersion 2.0

define(['N/currentRecord'], function(currentRecord) {

alertBox: function(){
var record = currentRecord.get();

var name = record.getValue({
fieldId: 'custpage_name',



This simple module can be attached to suitelet or user event script and can be used by calling alertBox function directly.


Popular posts from this blog

What are sales territory in Netsuite?

How to get and set a sublist in netsuite suitlet suitescript 2.0

SuiteFoundation Exam Notes Netsuite Basics