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.