- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2024 06:08 AM
Hi Community,
we have written a code when the user has cost center and manager and location should auto populate this is working fine, but for the cost center it is referring to the person department f the user has department then it should get populate on onload and on change if the person doesn't have any department then a (please_mention_cost_center) this variable should be visible and mandatory here everything works fine for admin roles but when I impersonate as end user the error saying( Error There is a JavaScript error in your browser console) showing this and console message is showing as below. can someone please help me to overcome this issue.
Here below the validation was not working eve though i have changed the user for onchange and as well for onloading of the form.
This is my on change client script.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2024 08:57 AM
If this is working for your admin accounts then I would check the ACL's on the GlideAjax and make sure your users have access to the script include. If that's not it could you provide the GlideAjax code?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2024 06:19 AM
in script includes the preferred way to return multiple values is to place them into an object then stringify (convert the object to a string) and return to the client script
Thanks
dgarad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2024 06:36 AM
Hi Mega, here is my script include can you please suggest how I can proceed in the script include here. thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2024 08:57 AM
If this is working for your admin accounts then I would check the ACL's on the GlideAjax and make sure your users have access to the script include. If that's not it could you provide the GlideAjax code?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2024 09:33 AM
Thanks for the reply. I have given the access to the end users(snc_internal) as well now this code working fine. my other query was it fine if we gave the access to the ITIL users also?
Below was the ACL access I have given.