- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2023 02:50 AM
Hello Community,
Currently i have a client script attached to one particular form with onLoad function.
It pulls data for Select Box from the external API.
Is it possible to store that script in Servicenow shared/global location so i can use it on other different forms or even forms in different apps?
Thank you,
Natasha
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2023 11:45 PM
Hi @NatG ,
Yes, you can put the script in UI Script, here is the example:
1. Create the UI Script in Global, please see the following screenshot
2. Call this script from Global Application OR from other Scoped Application:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2023 05:41 AM
Hi @NatG ,
Yes, you can put the script in UI Script. Here is the example.
1. Create the UI Script in Global, please see the following screenshot.
2. Call the script from Global OR other Scoped Applications.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2023 01:34 PM
Yes, you can add the code to a UI Script.
UI Scripts can be loaded into various places using various methods.
I suppose the most wildly available is using the ScriptLoader.getScripts() call.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2023 11:45 PM
Hi @NatG ,
Yes, you can put the script in UI Script, here is the example:
1. Create the UI Script in Global, please see the following screenshot
2. Call this script from Global Application OR from other Scoped Application:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2023 05:41 AM
Hi @NatG ,
Yes, you can put the script in UI Script. Here is the example.
1. Create the UI Script in Global, please see the following screenshot.
2. Call the script from Global OR other Scoped Applications.