The CreatorCon Call for Content is officially open! Get started here.

How Many types of Script Includes()?

ram2497
Tera Contributor

How Many types of Script Includes()?

Please provide the correct answer: Two types(client callable and server-side)  or Three types.

Which one correct?

Thanks

Ram

 

1 ACCEPTED SOLUTION

Jaspal Singh
Mega Patron
Mega Patron

Hi Ram,

 

There are only 2. Client Callable & Server side but these are not types they are options script include can be called.

For types there are 3. Class, Classless, onDemand. Refer link for a check. 

View solution in original post

4 REPLIES 4

vkachineni
Kilo Sage

I would say 2 but changing my opinion after Jaspal's answer

3 types

 

 

Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Vinod Kumar Kachineni
Community Rising Star 2022

Jaspal Singh
Mega Patron
Mega Patron

Hi Ram,

 

There are only 2. Client Callable & Server side but these are not types they are options script include can be called.

For types there are 3. Class, Classless, onDemand. Refer link for a check. 

Pooja Mallikarj
Kilo Sage

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 explanation you can refer the below link.

https://developer.servicenow.com/dev.do#!/learn/learning-plans/orlando/servicenow_application_develo...

 

Thanks,

Pooja M

Subhojit Das
Kilo Guru

Hi Ram,

There are 3 types of Script Include

1. On Demand/ Classless Script Include[You have to remove all the code which populates after inserting the name of Script Include and define a function]

2. Client Callable Script Include[Mark client callable checkbox as true]

3. Define a new class Script Include[define the function under the class created after creation of script include name]

https://snprotips.com/blog/2016/2/6/gliderecord-client-side-vs-server-side

https://docs.servicenow.com/bundle/kingston-application-development/page/script/server-scripting/con...

https://developer.servicenow.com/dev.do#!/learn/learning-plans/orlando/servicenow_application_develo...

Please mark the content as Correct and Helpful if you find it useful.

Regards,

Subhojit Das