ANS-0380 · SUITESCRIPT DEVELOPMENT
How to Call a NetSuite Suitelet from a Server-Side Script Using nlapiRequestURL?
Calling a NetSuite Suitelet from a server-side script using nlapiRequestURL requires specific configuration for public access.
Short answer
To successfully call a NetSuite Suitelet from a server-side script using nlapiRequestURL, the Suitelet must be configured to be "Avaiblable without login". Failing to do so will result in an "Unexpected error". This ensures the server-side script can access the Suitelet without authentication issues.
Scenario
A NetSuite server-side script attempts to invoke a Suitelet using the nlapiRequestURL function. However, the call fails, resulting in an "Unexpected error" because the Suitelet is not configured for public access. This prevents the server-side script from successfully communicating with the Suitelet.
Solution
To enable a server-side script to successfully call a Suitelet using nlapiRequestURL, the Suitelet must be configured to be "Avaiblable without login". This setting allows the Suitelet to be accessed without requiring user authentication, preventing "Unexpected error" messages during the nlapiRequestURL call.
Expert NetSuite Support
Need help with this NetSuite issue?
SuiteScript Development consulting and configuration support
