How can I define a Custom Global Variable?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2023 05:43 AM
Hello. I am aware of the magical ServiceNow global objects such as:
gs - Available in Server Side code.
g_form - Available in Client Side code.
My question is this: Can I define and instantiate my own custom global variable which is also uber available and does not require instantiation by every piece of code which wants to make use of it?
I know that there are Classless Functions which work this way on the Server Side, but I'd kind of like for them to live inside an object, as opposed to floating around independently. That way, I could simply type the name of my global object and then a DOT, and I would immediately see all of my magical functions which are available.
Make sense? Please advise. Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2023 05:48 AM
