Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

javascript await

gbunce
Kilo Expert

Does anyone know if the 'async' and 'await' operators are valid in ServiceNow? I assume not since they are causing an error but wanted reach out and validate.

2 REPLIES 2

Not applicable

You can create an async business rule.  I believe that would be ServiceNow's version of it.

 

Tony Chatfield1
Kilo Patron

Hi, I don't belive they are compatible.

The current SNC javascript engine is EMCA5
https://docs.servicenow.com/bundle/newyork-application-development/page/script/JavaScript-engine-upg...

Which I assume is the 5th edition
https://en.wikipedia.org/wiki/ECMAScript

The functions await and async were not defined until 2017 - 8th edition
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function
https://d...