Need help for Catalog UI Policy Script using AJAX calls
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2018 03:57 AM
Hi All,
Need some advice on the following:
I have a variable named "Groups" in my Catalog Item, i am trying to populate the list of groups that a portal requestor belongs to into the variable when the requestor is submitting a new request.
(He/She can choose the group that is required)
I did some testing and managed to do this in the background script, can someone help to advice how to write something similar under Catalog UI Policy -> Script using AJAX calls?
var groups = [];
var gr = new GlideRecord('sys_user_grmember');
var userID = gs.getUserID();
gr.addQuery('user', userID);
gr.queryNoDomain();
while(gr.next())
{
groups.push(gr.group);
}
Thank you for your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2018 04:34 AM
Hi Alex,
Any update on this?
Can you mark my answer as correct, helpful if you were able to achieve the requirement. This helps in removing this question from unanswered list and helps users to learn from your thread. Thanks in advance.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader