Changing Javascript Mode on an existing Application
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
I want to change the Javascript mode to ECMAScropt 2021 (ES12) on an existing application. The applicaiton was on ES5 Standards mode till now.
I wanted to know if changing this will affect the existing code in the system.
Thank you!
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
1. Refer: https://www.servicenow.com/docs/r/api-reference/scripts/set-javascript-mode-application.html
Procedure
- In the application navigator, enter sys_app.list.
- Select an application.
- In the JavaScript Mode field, select the mode to use.
- ECMAScript 2021 (ES12): Supports a subset of ECMAScript 2021 (ES12) and ECMAScript 2022 (ES13) syntax and features.
- ES5 Standards Mode: Supports ECMAScript5 syntax and features.
- Compatibility Mode: Used for all scripts developed prior to the addition of ES5 Standards mode.
- Select Update.
2. Turn Off this per script include . Refer: https://www.servicenow.com/docs/r/xanadu/api-reference/scripts/set-es12-mode-scripts.html
- Navigate to a form with a script field.For example, to open a script include form, navigate to All > System Definition > Script Includes or enter sys_script_include.list in the navigation filter.
- Select an existing script
- Turn off ECMAScropt 2021 (ES12)
Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti