javascript - Suitelet of netsuite not running - Stack Overflow

admin2025-04-19  0

function demoHTML(request, response)
{
    var html =  ' <html> <body> <h1>Hello World</h1> </body> </html>';
    response.write( html ); 
   //prefix header with Custom-Header. See nlobjResponse.setHeader(name, value)
    response.setHeader('Custom-Header-Demo', 'Demo');
}

After deploying the Script the following error is ing...

ERROR

You are not allowed to navigate directly to this page

function demoHTML(request, response)
{
    var html =  ' <html> <body> <h1>Hello World</h1> </body> </html>';
    response.write( html ); 
   //prefix header with Custom-Header. See nlobjResponse.setHeader(name, value)
    response.setHeader('Custom-Header-Demo', 'Demo');
}

After deploying the Script the following error is ing...

ERROR

You are not allowed to navigate directly to this page

Share edited Apr 29, 2015 at 13:16 Rockstar 2,2883 gold badges23 silver badges40 bronze badges asked Apr 29, 2015 at 10:50 user4441409user4441409 1
  • 1 Make sure that the Select All check box has been selected on the Audience tab of the Script Deployment page. – Rockstar Commented Apr 29, 2015 at 12:54
Add a ment  | 

3 Answers 3

Reset to default 7

I had the same problem, make sure the Status is set to "Released".

As @Rockstar stated, check the Audience tab on your Script Deployment. Make sure that the applicable Roles or Employees are allowed to access the page, and make sure that the user/role that you are using have access as well. By default, no permissions are given to anyone on the Deployment.

I had an issue where I was updating the scripts via advanced add in file Cabinet -- using overwrite existing files

I had to remove and recreate the script record.

Source control showed it was exactly the same record before and after.

My purpose was to test something --- if i update files via SDF all is well. Not sure if updating via SDF after the advanced add would have resolved it.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1745057782a282507.html

最新回复(0)