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!
Now, you can stay up-to-date with the latest discussions, helpful tips, and important announcements, all delivered straight to your inbox. Whether you’re looking to catch up on what you missed or just want a quick overview, our email digest has you covered. To learn more and to subscribe, click here.
SuiteScript: Error: "Failed to Evaluate Script"
Hi,
I am fairly new to Netsuite, and very new to SuiteScript, but do have some experience with Java.
I am trying to get the Total Weight of the items on an Invoice to reflect in a custom body field. (that I can reference on a custom invoice pdf)
I have found this SuiteAnswer: 37168
"Calculate Total Weight"
The script that it provides is throwing an error:
Fail to evaluate script: {"type":"error.SuiteScriptModuleLoaderError","name":"UNEXPECTED_ERROR","message":"ReferenceError: \"objRecord\" is not defined. (SS_SCRIPT_FOR_METADATA#6)","stack":[]}
When I research this, it appears that SuiteScripts may now require a define() function. Which I am not sure exactly how the syntax should be applied to make it work.