Called from client script with Client Callable set to false

kamo1
Tera Contributor

I asked Chat GPT and they replied that due to security issues, it is better to inherit AbstractAjaxProcessor with Client Callable in the Script Include set to false and use AJAX.

I was creating a Script with Client Callable set to True when using AJAX, which is the correct way?
Also, can I use AJAX from Cilent Script with Client Callable set to False?

1 ACCEPTED SOLUTION

Sandeep Rajput
Tera Patron
Tera Patron

@kamo1 When writing a server side scripting include which needs to be called from a client script, you need to inherit AbstractAjaxProcessor and set the client callable checkbox to true. 

 

One the above setup is done you can call the server side script include method using GlideAjax in client script.

 

You will not be able to call a Server side script using GlideAjax in client script if the Client callable checkbox is false on the script include.

 

Hope this helps.

View solution in original post

2 REPLIES 2

Sandeep Rajput
Tera Patron
Tera Patron

@kamo1 When writing a server side scripting include which needs to be called from a client script, you need to inherit AbstractAjaxProcessor and set the client callable checkbox to true. 

 

One the above setup is done you can call the server side script include method using GlideAjax in client script.

 

You will not be able to call a Server side script using GlideAjax in client script if the Client callable checkbox is false on the script include.

 

Hope this helps.

Mark Manders
Mega Patron

You can't call a script include client side without having client callable set to true. 

It would be helpful to know what it is you are trying to achieve, what you already have and what isn't working. 

 

The fact that ChatGPT gives wrong or useless answers is the reason it will be a while before we are replaced. It can help in finding flaws in scripts, but if you are leaning on it to tell you how to do something, it will take you a lot longer to achieve your goal, because you have to fix the things ChatGPT told you, which doesn't really help, because you asked it because you didn't know how to do it. 


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark