Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
add a button on view mode depending on record type
Hi,
I am new to SS2,and stuck at checking the record type and record id of a record on view mode (via user event).
I am creating a ue script that would add a button on view mode, and different label depending on what is the current record type.
so in ss1 it would be something like:
if(type == 'view'){
if(nlapiGetRecordType() == 'salesorder'){
//add button
form.addButton('cuspage_btn1','SO','printso()');
//load record
var rec =nlapiLoadRecord(nlapiGetRecordType(),nlapiGetRecordId());
.....
} else if (nlapiGetRecordType() == 'invoice'){
form.addButton('cuspage_btn1','INV','printinv()');
......
}
}
Im having a hard time figuring out the equivalent module/method for nlapiLoadRecord for ue script
0