Hi All, I have a client script which is deployed o...
# suitescript
h
Hi All, I have a client script which is deployed on address form in which we are importing library file in which we are returning a function and I'm getting below error.
Copy code
{
   type: "error.SuiteScriptModuleLoaderError",
   name: "UNEXPECTED_ERROR",
   message: "missing : after property id (/SuiteScripts/CRM/crm_addressEntryForm_cs.js#13)",
   stack: [
      "wrapModuleLoaderError(handleV2RecordScripting:3411)",
      "injectScript(handleV2RecordScripting:3533)",
      "<anonymous>(handleV2RecordScripting:3732)",
      "<anonymous>(handleV2RecordScripting:2631)",
      "<anonymous>(handleV2RecordScripting:1782)",
      "<anonymous>(handleV2RecordScripting:1772)",
      "<anonymous>(handleV2RecordScripting:1802)",
      "<anonymous>(handleV2RecordScripting:2105)",
      "<anonymous>(handleV2RecordScripting:2496)",
      "<anonymous>(handleV2RecordScripting:2090)",
      "<anonymous>(handleV2RecordScripting:1073)",
      "each(handleV2RecordScripting:998)",
      "<anonymous>(handleV2RecordScripting:2052)",
      "<anonymous>(handleV2RecordScripting:1736)",
      "<anonymous>(handleV2RecordScripting:2401)",
      "<anonymous>(handleV2RecordScripting:2847)",
      "<anonymous>(handleV2RecordScripting:2848)",
      "localRequire(handleV2RecordScripting:2390)",
      "<anonymous>(N/scriptLoader.js)",
      "<anonymous>(handleV2RecordScripting:2677)",
      "<anonymous>(handleV2RecordScripting:1823)",
      "<anonymous>(handleV2RecordScripting:2105)",
      "<anonymous>(handleV2RecordScripting:1736)",
      "<anonymous>(handleV2RecordScripting:2401)",
      "<anonymous>(handleV2RecordScripting:2847)",
      "<anonymous>(handleV2RecordScripting:2848)",
      "localRequire(handleV2RecordScripting:2390)",
      "entryPointRequire(N/scriptLoader.js)",
      "v2EnhancedCall(NLRecordScripting.scriptInit:5893)",
      "doTriggerScript(NLRecordScripting.scriptInit:5939)",
      "nlapiPageInit(NLRecordScripting.scriptInit:624)",
      "page_init(NLRecordScripting.scriptInit:217)"
   ]
}
e
I bet you have a mismatch in SuiteScript version between the Library module and the Client Script
Guessing the Client Script is 2.0, and the library uses 2.1
h
both are 2.1
e
Assuming there isn't actually a syntax error in your code, that error almost always results from trying to run 2.1 code within a 2.0 execution environment
If it's 2.1 all the way down, then I'm not sure 😕
r
I had an issue with this today. I had declared the same const naming in two separate if conditions within the same entry point function
My script is 2.0
the error message didn't make any sense
b
address client script will run serverside on load of an address