How to solve the error SUITESCRIPT_API_UNAVAILABLE_IN_DEFINE when uploading the file to NetSuite?

Issue

I encountered the error **SuiteScript_API_Unavailable_in_Define** while uploading my script to NetSuite, despite using API version 2.1

Solution

This PASSES syntax checks and SUCCEEDS to upload to NetSuite:

The only difference is moving the reference to N/format inside the main function.

Leave a comment

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