why On demand Script Includes can never be used client-side even if the Client callable option is selected.?

Syam Kumar
Kilo Contributor

I just want to know the reason behind  On demand Script Includes can never be used client-side even if the Client callable option is selected.

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Syam,

Any example for this you want to share?

on demand script includes are classless script includes and doesn't include more than 1 function

they are as good as server side script include and hence couldn't be called from client side

Regards

Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Shrutika Surwad
Kilo Guru

hey,

On demand script include is classless. and we can't call this from client script.

https://developer.servicenow.com/app.do#!/lp/new_to_servicenow/app_store_learnv2_scripting_madrid_on...

 

you can check following thread

 

thanks,

shrutika surwade

find_real_file.png

 

Alikutty A
Tera Sage

Hi,

Ondemand script includes can never be called inside a client side scripts. They are purely server side functions and can only be called within the server side objects. They do not have a Class structure defined and hence cannot be accessed from the client side scripts. You could call them directly from server side scripts.

Thanks!

 

DScroggins
Kilo Sage
Hello, Marking a Script Include as 'Client Callable' simply denotes that the Script Include extends the AbstractAjaxProcessor class. This allows you to utilize GlideAJAX to utilize the Script Include from the client side. AJAX is the way you can call server side methods from the client. --David