ANS-1287 · SUITESCRIPT DEVELOPMENT
How to Resolve ‘SyntaxError: Unexpected token <' When Adding Vendor Bank Details?
This guide addresses the 'SyntaxError: Unexpected token <' error encountered when creating new vendor bank details in NetSuite, often related to online forms or script deployment configurations.
Short answer
The "SyntaxError Unexpected token '<', "<!DOCTYPE "... is not valid JSON" when adding vendor bank details in NetSuite is resolved by enabling 'Online Forms' under Setup > Company > Enable Features > CRM. If the error persists, ensure key script deployments, such as `customdeploy field_validator_cs`, have all external roles selected under their Audience tab.
Scenario
When attempting to create new bank details for a vendor in NetSuite, users may encounter a "SyntaxError Unexpected token '<', "<!DOCTYPE "... is not valid JSON; ID:" error message. This issue prevents the successful creation of vendor bank information.
Solution
This issue can be resolved by verifying and adjusting specific NetSuite configurations.
Enable Online Forms Feature:
- Navigate to
Setup > Company > Enable Features. - Go to the
CRMtab. - Ensure
Online Formsis checked (T). - Click
Save. - If the error persists after this step, proceed to step 2.
- Navigate to
Adjust Script Deployment Audience Settings:
- Go to
Customization > Scripting > Script Deployments. - Locate and
Editthe script deployment:customdeploy field_validator_cs. - Under the
Audiencetab, select all roles (multi-select) forEXTERNAL ROLES. Verify thatOnline Form Useris marked. - Click
Save. - Repeat these steps for the following script deployments:
- Go to
customdeploy_ encryption_suiteletcustomdeploye xchangrate_loader_sucustomdeploy trans_unlinker_sucustomdeploy_ep_get_taxregnumbercustomdeploy ep_license_info_sucustomdeploy processor_bridge_sucustomdeploy field_validator_sucustomdeploy ep_admin_data_loadercustomdeploy_get_customrecord_idcustomdeploy translation_service_su
Expert NetSuite Support
Need help with this NetSuite issue?
SuiteScript Development consulting and configuration support
