Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

GlideAjax in Catalog clien script don't work with non-admin user

Matteo4
Tera Contributor

I created a catalog client script onLoad that call a script include using GlideAjax but on portal when i open the item, with admin the ajax call work, with other user (without role) don't work. I inserted some log on script include and with no-admin user the script include is not execute.

This is the call:

find_real_file.png

This is the called function:

find_real_file.png

This is the result with admin:

find_real_file.png

This is the result without admin:

find_real_file.png

-----------------------------------EDIT-----------------------------------------

My script include:

find_real_file.png

My catalog client script:

find_real_file.png

 

Anyone can help?

Thanks

1 ACCEPTED SOLUTION

Hi Can you add the below function after line number 3


isPublic: function () {
return true;
},

 

Regards
Harish

View solution in original post

13 REPLIES 13

Wow, it surprisingly worked for me, thanks a lot! However, why is this working? I don't understand why this solves my problem, anybody knows?

Sophia10
Tera Expert

I had the exact same problem and it worked when I added suggested code, thank you for your help!

CharanjeetSingh
Tera Contributor

Hi all,
For me when I add public function and do logout, logout page runs into a loop and refreshing the session_timeout function again and again. Any idea about why this is happening, even the script include is not called from any logout script.

Hilbrandt van B
Tera Contributor

Better is to add an ACL for the script include.

Operation=execute

Type=client_callable_script_include

Name=<name of your script include>

 

Then add the roles who may access the Ajax call from the Catalog Client Script

 

Best Regards