ANS-1896 · SUITESCRIPT DEVELOPMENT
Why Does nsStringToXML Error Occur in NetSuite Client Scripts?
NetSuite client scripts lack permissions to create records, causing the nsStringToXML error; use a user event script for record creation, especially with online forms.
Short answer
The nsStringToXML error in NetSuite client scripts indicates a permission issue preventing record creation. Client scripts do not have the authority to create records. To fix this, utilize a user event script instead. User event scripts run server-side and possess the required permissions for record creation, especially when processing online form submissions.
Scenario
Users encountering the nsStringToXML error often experience it when attempting to create a record directly from a NetSuite client script. This issue typically arises during the submission of an online form where the client script is configured to handle record creation. The error message signals a fundamental permission limitation within the client-side execution environment.
Solution
The nsStringToXML error is primarily caused by a lack of permission for client scripts to create records. To resolve this, a user event script should be implemented. User event scripts execute on the server side and possess the necessary permissions to create records, making them the appropriate choice when the goal is to create a record upon submitting an online form.
Expert NetSuite Support
Need help with this NetSuite issue?
SuiteScript Development consulting and configuration support
