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.

  1. Enable Online Forms Feature:

    • Navigate to Setup > Company > Enable Features.
    • Go to the CRM tab.
    • Ensure Online Forms is checked (T).
    • Click Save.
    • If the error persists after this step, proceed to step 2.
  2. Adjust Script Deployment Audience Settings:

    • Go to Customization > Scripting > Script Deployments.
    • Locate and Edit the script deployment: customdeploy field_validator_cs.
    • Under the Audience tab, select all roles (multi-select) for EXTERNAL ROLES. Verify that Online Form User is marked.
    • Click Save.
    • Repeat these steps for the following script deployments:
  3. customdeploy_ encryption_suitelet

  4. customdeploye xchangrate_loader_su

  5. customdeploy trans_unlinker_su

  6. customdeploy_ep_get_taxregnumber

  7. customdeploy ep_license_info_su

  8. customdeploy processor_bridge_su

  9. customdeploy field_validator_su

  10. customdeploy ep_admin_data_loader

  11. customdeploy_get_customrecord_id

  12. customdeploy translation_service_su

Expert NetSuite Support

Need help with this NetSuite issue?

SuiteScript Development consulting and configuration support

Talk to a consultant