RE: How to force NetSuite to “get” a script’s API version (2.x -> 2.1) update?

Hi all,

We’ve updated all the scripts in the SuiteApp we’re developing to 2.1 syntax recently – and changed the @NApiVersion JSDoc tag in the script files accordingly: from 2.x to 2.1.

However, on releasing this, we get reports from customers who claim that when they upgrade, NetSuite UI continues showing 2.0 as the API VERSION on the Customization -> Scripting -> Scripts page, for at least some of the scripts (as in the screenshot below). What’s worse, this causes NetSuite to throw an error whenever a 2.1 syntax is encountered in one of them, essentially making our SuiteApp unusable…

RE: How to force NetSuite to

We’re quite baffled over this, and can’t reproduce the behavior in our testing accounts. Would anyone know what may be causing this, if there’s any setting to check, or how to remedy the situation? Our suspicion so far goes in the direction of an internal NetSuite bug.

Thanks!

 

jzankowski Rookie Asked on August 13, 2024 in SuiteScript.
Add Comment
2 Answers

I ran into this same irritating issue and the workaround propsed by @jzankowski didn’t work. As a long shot, I removed all the code form the file and just left a bare-bones script shell like this (TypeScript) and it solved the issue. I then pasted back in my actual code, updated the file in the File Cabinet and NetSuite help the 2.1 API version. Oh NetSuite….

Update: Is this site really being maintained anymore? The formatted code looks like garbage, removes whitespace and truncates the last line. Then the “Share” link shows html source. I’m using FireFox.

RE: How to force NetSuite to

/**
* Company xxxxxxx
* Description xxxxxxx
* Note: JavaScript is transpiled from TypeScript source xxxxxxxx.ts
*
* ScriptId xxxxx
* DeploymentId xxxxx
*
*
* @NApiVersion 2.1
* @NScriptType scheduledscript
**/
 
namespace NV {
export function execute () {
}
}
export = {
execute: NV.execute,
}

 

 

Rookie Answered on December 16, 2024.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.