Need to call script include in reporting.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2019 02:53 AM
Hi All
I have a requirement in which i want to get report of all the cases who's assignment group is part of "report group".
"report group" is a field which i have created in my user form in which we can add n number of groups.
I know we can achieve this using script include then calling that function using java script but that is knot working i dont know why.
i have written below code but this is not working
var getGroup = Class.create();
getGroup.prototype = {
initialize: function() {
},
getreportgroup: function(){
var group ='';
var user = new GlideRecord('sys_user');
user.addQuery('sys_id',current.sys_id);
user.query();
while(user.next()){
group = user.u_report_group.toString();
}
group = 'sys_idIN' + group;
gs.log('testing'+ group);
return group;
},
type: 'getGroup'
};
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2019 03:40 AM
Hi Pragati,
What does the log show?
Does it show list of sys_ids?
Also can you check whether the script include function itself is getting called or not?
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2019 03:59 AM
No log entry is not there, I checked
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2019 04:18 AM
Hi Pragati,
So it means the script include and the function itself is not getting called and hence sys_id array is not returned.
Can you share screenshot of how and where you are calling that?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2019 12:09 AM
Hi Pragati,
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2019 12:11 AM
Hi Pragati,
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