Trying to use script include in a dictionary override...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-10-2024 01:16 AM - edited ‎04-10-2024 06:23 AM
Otherwise, when the problem record has another state from the assignment group field I can choose other groups, not only those with the group type 'Ana'. I created an Script include that I want to call from the dictionary override. But with no success til' now
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-10-2024 03:26 AM
Hi @B_pppppp
Since we're using the Group Type field, we don't need to query again to the Group table.
Let's try my sample below.
Script Include
var ProblemHelper = Class.create();
ProblemHelper.prototype = {
initialize: function() {
},
getGroupTypeForRefQual: function(problem){
var state = problem.getValue('state');
//1cb8ab9bff500200158bffffffffff62: group type 'itil'
var groupType = (state == 101 || state == 102) ? '<your_group_type_sys_id' : '1cb8ab9bff500200158bffffffffff62'; //replace the group type in else condition
return groupType;
},
type: 'ProblemHelper'
};
Dictionary Override
javascript: 'typeLIKE' + new ProblemHelper().getGroupTypeForRefQual(current)
Cheers,
Tai Vu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-10-2024 03:43 AM
It still shows all the available groups and it doesn't filter the desired group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-10-2024 03:53 AM - edited ‎04-10-2024 06:24 AM
This is the situation now: I tried a new code and this also doesnt work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-10-2024 04:16 AM
Replace line 19 with "return "sys_idIN" + groupList.join(',');"
Please mark helpful if this solves your problem.
Vijendra Sainy
InfoBeans
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-10-2024 04:25 AM - edited ‎04-10-2024 06:24 AM
I did, also this is the reference qualifier