Discussions
Join the NetSuite community to innovate, connect, and discover what’s next.
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Register now
In 2.0 Redirect to Suitelet but in a new window
Hi all,
I have added a Print Label button in my 2.0 userevent beforeLoad and attached a Suitelet to it.
var printLabelSU = url.resolveScript({
scriptId :'customscript_xxx_su',
deploymentId :'customdeploy_xxx_su',
returnExternalUrl : false
}) + '&recId=' + scriptContext.newRecord.id;
var printLabel = "window.open('"+printLabelSU+"','_blank');";
scriptContext.form.addButton({
id : 'custpage_print_label',
label : 'Print Label',
functionName : printLabel
});
On the click of this button, the Suitelet renders a pdf and opens it in new window.
I need to achieve similar task on Save of the record.
So in userevent afterSubmit I am calling
redirect.toSuitelet({
scriptId: xxx,
deploymentId: x,