Reputation: 43
Netsuite are making some changes to the nlapirequestURL() method which i am using to call out to an external url, from both client and server side events.
my scripts (suitescript 1.0) all run in the userInterface context and i use nlapiGetLogin() to verify that the user is logged in before the method is called, given that my scripts are deployed with 'all roles' selected in the Roles field on the Audience subtab of the script deployment.
Are my scripts running in a trusted or untrusted context? i can't seem to identify a definitive answer to this in the NS documentation.
I have checked online and some say yes / others no... and there doesnt seem to be a method to check if context is trusted or not.
Netsuite communication
As of October 15, 2024, requests to external URLs using the following methods will be allowed only for authenticated session:
Suitescript 1.0
nlapirequestURL()
SuiteScript 2.x
N/http.request(), N/http.get(), N/http.post(), N/http.put(), N/http.delete()
N/https.request(), N/https.get(), N/https.post(), N/https.put(), N/https.delete()
Scripts that use any of these methods for external requests will no longer work in untrusted contexts.
Untrusted contexts include:
A client script where all roles are selected in the Roles field on the Audience subtab of the script deployment record, AND
The client script is running for users whose identity cannot be identified, such as customers and shoppers on Web sites.
Required actions
Before October 15, 2024, you should identify scripts in your account that use above methods and ensure they are used only in a trusted context.
These scripts include but are not limited to client scripts associated with external forms and Suitelets or client scripts used in Web sites. For example, client scripts may be associated with Suitelets in scripts where the clientScriptFileId property is in use.
Look for the usages of the affected functions there.
This restriction only applies to request to external URLs, so
If the requested URL is relative (e.g. /app/site/...), it can be skipped; this qualifies as an inbound request.
If the request only happens in the server environment, it can be skipped. If you are unclear, consider the request affected.
For more information about the affected methods, see N/http Module, SuiteAnswers ID 44806.
Upvotes: 0
Views: 62