Xanadu ES12 in Global

NS
Kilo Sage

Hello,

 

The Xanadu highlights in docs state:

  • Use ECMAScript 2021 (ES12) features in any server-side script.

I understand this to also mean Global scope, in scoped apps this has been available since Tokyo. I spun up a PDI which is running on build `glide-xanadu-07-02-2024__patch0-07-16-2024`

Apart from `const` and `let` no new ES features seem to be working. I was trying template literals, for...of loop, arrow function and spread operator. I tried running both in a Fix Script so I could make sure the ES12 toggle was on, and in background script. But the result isn't good.

Script compilation error: Script Identifier: null.null.script, Error Description: syntax error (null.null.script; line 4), Script ES Level: 0, Interpreted Mode: true

bg script NS_1-1722858083099.png

fix script NS_0-1722858542180.png

 

In a scoped app the same script runs like a charm

NS_2-1722858129645.png

 

 

The docs also state "No plugins or properties are required to install the new JavaScript engine."  So what gives? Any ideas?

 

edit: maybe this post went into a wrong category - idk how to change it though

3 ACCEPTED SOLUTIONS

NS
Kilo Sage

Still not working in Patch 3 (glide-xanadu-07-02-2024__patch3-10-23-2024)

Got reply from SN:


Thank you for your patience on this. At this stage, we could see that the Defect has been waived for Yokohama and Targeted to Zurich. 

Will keep you posted as soon as the fix is available. 

 

View solution in original post

NS
Kilo Sage

ServiceNow finally acknowledged that the feature indeed does not work:

KB1699139 + Related Problem: PRB1794568

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1699139

 

No info on when it'll be fixed though.

View solution in original post

Hi @NS 

I can say that for my initial test in a fix script in Zurich patch 0 it works in the global scope

View solution in original post

27 REPLIES 27

Simon Christens
Kilo Sage

Nothing have changed from Yokohama rtp to patch 0 as it still doesn't work in patch 0

Build tag: glide-yokohama-12-18-2024__patch0-01-14-2025

Same goes for Yokohama Patch 1 😞

NS
Kilo Sage

ServiceNow finally acknowledged that the feature indeed does not work:

KB1699139 + Related Problem: PRB1794568

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1699139

 

No info on when it'll be fixed though.

dosualdo
Tera Contributor

Hello, @NS

Do I need to be granted special access to be able to open this KB? I'm getting an access problem:

dosualdo_0-1747510432121.png

Can you help me?

Hi, for whatever reason ServiceNow doesn't allow access to public to the KB articles. If you're associated with some organization, you should ask to be added to the company Now Support account.

 

Not that the article contains any valuable information which you wouldn't get from this thread. Simply put ES12 doesn't work in global scope right now and: "This problem has no workaround, is currently under review and targeted to be fixed in a future release."