How many types of script include are there??

kshitij4
Giga Contributor

please tell

7 REPLIES 7

Ashutosh Munot1
Kilo Patron
Kilo Patron

Hi,

we have two mainly i.e. Client callable and Server side script includes.


Client callable means we can call them using Client script and from any client side code using glide ajax.


Server side means this can be only called using server code by initializing a object as below:

var gr = new ScriptIncludeName.FunctionNAme();



Thanks,
Ashutosh Munot

Bhawana Upreti
Tera Guru

Hi,

Script Includes are reusable server-side script logic that define a function or class. Script Includes execute their script logic only when explicitly called by other scripts. There are different types of Script Includes:

  • On demand/classless
  • Extend an existing class
  • Define a new class

For more information, Click here

How to call Script include :

GlideRecord & GlideAjax: Client-Side Vs. Server-Side

 

Rajesh Mushke
Mega Sage
Mega Sage

Hey Kshitij,

 

default Class Pattern is just one of at least 5 possible interface design patterns that we can use when writing our Script Includes.  Let's take a quick look at these design patterns:

1. Class Pattern

2. Function Pattern

3. Namespace Pattern

4. Global Include Pattern

5. Module Pattern (Revealing Module Pattern)

 

Please Refer below Link for more details:

Interface Design Patterns for Script Includes

 

You can also refer docs & community Threads:

how to write the Script include in service now

TechNow Episode 6 | Script Includes

Script includes

Use script includes

 

i hope this will be helpful to you, 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