Discussions
SuiteWorld is the largest annual gathering of the NetSuite community! It will be held in Las Vegas on October 6-9, 2025. Our customers and partners look forward to SuiteWorld every year as a place to hear the latest from NetSuite, get hands-on learning, and connect with each other. Register now!
How to use the search module in a function in client script?
Hello NetSuite Guru,
I created a button for the sales order form from User Event script, when user clicks on that button, the logic will be processed from a function in the client script attached on that form.
In the function to process the button, I created a search but NetSuite showed the error: Uncaught SyntaxError: illegal character U+200C
Here is the button I created in User event script:
context.form.addButton({
id: "custpage_overwrite_amt_button",
label: "Update amount",
functionName: 'updateAmt('+ recordId + ')'
});
context.form.clientScriptModulePath = "SuiteScripts/CustomerClientScript";
And in the CustomerClientScript.js client script, the updateAmt function creates the search as below: