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

10 REPLIES 10

Vishal Khandve
Kilo Sage

Hi,

 

can you please share script include code

 

Thanks,

Vishal

Mark Roethof
Tera Patron
Tera Patron

Hi there,

Could this be a rights issue? Like ACL's? Are you trying to access data thru the GlideAjax? Which is available for the admin role, though not for the users without any role? Not sure because you've cut some pieces out of the screenshots 🙂

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark

---

LinkedIn

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

vinothkumar
Tera Guru

Usually when I run into problems like this, it's related to the ACLs on the tables that you're linking to.   I would check and make sure that the non-admin user has read access on the fields that are being accessed by the client script.   Hopefully granting read access will clear up the issue

Matteo4
Tera Contributor

In my case i don't need ACL because my script include return a simple string, the catalog client script start but the function called using glide ajax don't