Marty Zigman

Conversations with Marty Zigman

Certified Administrator • ERP • SuiteCloud

Marty Zigman LinkedIn

Marty Zigman

Holding all three official certifications, Marty is regarded as the top NetSuite expert and leads a team of senior professionals at Prolecto Resources, Inc.. He is a former Deloitte & Touche CPA and has held CTO roles. For over 30 years, Marty has produced leadership in ERP, CRM, and eCommerce business systems. Contact Marty to set up a conversation.

BiographyYouTubeLinkedInX (Twitter)

5 thoughts on “Get a SuiteScript to Automatically Set NetSuite’s External ID

  1. Vernita says:

    Hi. Trying to upload the script though confused by the part relating to the script parameter. How would you reference a field using that?e.g. do you need to create a parameter with type ‘free-text’ on the script deployment record. Would this have an id of custscript_accountnumber(for example if you wanted to reference the customer account number)

  2. Marty Zigman says:

    Hell Vernita,

    Your question is out of context from this blog post. But see if this version 1.x code example helps you?

    https://blog.prolecto.com/2012/04/25/draw-external-html-pages-within-netsuite/

    Marty

  3. Frank Chiuppi says:

    Thank you for this!

    I used it to allow end users to update the external ID in the UI with inline editing.

    Regards,

    Frank

  4. Luke says:

    I copied and saved this script as a .js file, but when I tried to create a new script record in Netsuite and used this as my file, it is throwing an error:

    Fail to evaluate script: {“type”:”error.SuiteScriptModuleLoaderError”,”name”:”SyntaxError”,”message”:”SyntaxError: /SuiteScripts/externalidtest.js:23:17 Expected ; but found is\n\t\t\treturn; there is no change;\n\t\t\t ^\n/SuiteScripts/externalidtest.js:24:4 Expected an operand but found else\n\t\t} else {\n\t\t ^\n/SuiteScripts/externalidtest.js:33:4 Expected , but found }\n }\n ^\n/SuiteScripts/externalidtest.js:35:4 Invalid return statement\n return {\n ^\n/SuiteScripts/externalidtest.js:37:4 Expected eof but found }\n };\n ^\n [return; there is no change;, ^, /SuiteScripts/externalidtest.js:24:4 Expected an operand but found else]”,”stack”:[“SyntaxError: /SuiteScripts/externalidtest.js:23:17 Expected ; but found is”,”\t\t\treturn; there is no change;”,”\t\t\t ^”,”/SuiteScripts/externalidtest.js:24:4 Expected an operand but found else”,”\t\t} else {“,”\t\t ^”,”/SuiteScripts/externalidtest.js:33:4 Expected , but found }”,” }”,” ^”,”/SuiteScripts/externalidtest.js:35:4 Invalid return statement”,” return {“,” ^”,”/SuiteScripts/externalidtest.js:37:4 Expected eof but found }”,” };”,” ^”,””]}

    Is this something within my environment or am I attempting to create a new script the wrong way?

  5. Marty Zigman says:

    Hello Luke,

    You appear to have basic syntax challenges getting it to work. Consider getting the code in notepad and possibly using a JavaScript validator before you push it into NetSuite. Make sure you are defining a User Event type.

    Marty

Leave a Reply

Your email address will not be published. Required fields are marked *