How many types of script include are there??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-10-2018 11:03 AM
please tell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-10-2018 11:11 PM
Hi Kshitij,
There are basically 3 types of Script Includes in ServiceNow.
1) Client-Callable Script Include( Classless): Classless Script Includes will generally contain a single function definition, as shown below for the function getMyTitle(). However it is possible to define multiple functions within the same Script Include.
2) Script Include with class :
Defining a Script Include with a Class may seem more complex at first, but ServiceNow actually provides the initial code stub upon naming the record. Shown below is a basic Classdefinition.
3) On Demand Script Include : A Script Include that defines a single function is known as an on demand, or classless, Script Include. The function is callable from other server-side scripts. On demand Script Includes can never be used client-side even if the Client callable option is selected.
It is critical that the Script Include name is an exact match for the name of the function. In the example, both the Script Include and the function are named sumTwoNums.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-10-2018 11:42 PM
Hi,
Mainly two types of script include are available i.e. client callable( that is called from client script) & server side(that calls from server side).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2018 09:39 AM
Hey kshitij,
i hope your query is been answered, can you please close this thread, then only this will be helpful for other community users
Let me know if you need more help..!!
Thanks,
Rajashekhar Mushke,
Community Leader - 18
Thanks,
Rajashekhar Mushke
Rising star : 2022 - 2024
Community Leader -2018
Connect me on LinkedIn : Rajashekhar Mushke