Discussions
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Invoke Suitelets from buttons
Some examples of how to invoke a Suitelet from custom buttons in various contexts:
Client Side button (edit mode) - Opens the Suitelet in a new window:
function suiteletButton(type, name)
{
var param1 = nlapiGetFieldValue('field1');
var param2 = nlapiGetFieldValue('field2');
window.open("/app/site/hosting/scriptlet.nl?script=XXXXXXX&deploy=XXXXXX¶m1="+param1+"¶m2="+param2, "newwin", "dependent = yes, height=850, width=1000, top=100, left=200, toolbar=no, scrollbars=yes, menubar=no, status=no, titlebar=no, resizable=yes, location=no");
}
Server Side button (view mode) - Redirects the user to the Suitelet
function suiteletButton(type,form)
{
if ( type == 'view' )
{
var param1 = nlapiGetFieldValue('field1');