Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to learn more!
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');