Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
Suitelet Question
I am trying to write a suitelet. On a demonstration form with a couple of fields, I created a client script for execution on field change.
1. function demoload(namex,type)
2. {
3.
4. var url = nlapiResolveURL('SUITELET','customscriptdemosimpleform','customdeploydemosimpleform',true);
5. alert( url);
6. var a = new Array();
7. a['User-Agent-x'] = 'SuiteScript-Call';
8. var response = nlapiRequestURL( url, null, a, null);
9. alert('Check it');
10. return true;
11. }
it calls the following
1.
function
demosimpleform(request, response)
#
{
#
var
# html = '<html><body><h1>Hello World</h1></body></html>';
response
# .write(html);
response
# .setHeader('Custom-Header-Demo', 'Demo');
nlapiLogExecution
# ('DEBUG', 'form finished', 'written');