- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-26-2018 09:14 AM
Hi experts,
The Assignment group in the Standard Change template is not working as same as on the Change form.
The Assignment Group in the change form shows few user groups as below.
But the user groups in the Standard Change Template shows all user groups.
How to make these sync? Any suggestions are much appreciated.
Thanks,
Karthik babu.
Solved! Go to Solution.
- Labels:
-
Change Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-26-2018 12:13 PM
Hi Karthik,
I misunderstood your post initially. I got your issue now. you need to write a Before query business rule on Groups table(sys_user_group) as shown below.
(function executeRule(current, previous /*null when async*/) {
var targetName = gs.action.getGlideURI().getMap().get('sysparm_target');
if (targetName.indexOf('change_request.assignment_group') > -1) {
current.addEncodedQuery('Your Query'); // installed
}
})(current, previous);
When you click the magnifying glass, there is a parameter in URL sysparm_target that always differ a little bit. On the change form it's just change_request.assignment_group, and all the reference qualifiers but on change proposal, it has format like change_request.assignment_group.{sys_id format}, it doesn't have qualifiers. Above script helps you add the qualifier to the URL so that you can match the assignment group list both on the standard change template and change request form
Mark it as correct if it is helpful.
BR,
Murali Krishna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-26-2018 11:02 AM
Hi Karthik,
Assignment group on the change form shows the groups which are "itil" and null. Check if it has any reference qualifier conditions. Usually the assignment group lookup field on the standard template shows all the active groups list.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-26-2018 12:13 PM
Hi Karthik,
I misunderstood your post initially. I got your issue now. you need to write a Before query business rule on Groups table(sys_user_group) as shown below.
(function executeRule(current, previous /*null when async*/) {
var targetName = gs.action.getGlideURI().getMap().get('sysparm_target');
if (targetName.indexOf('change_request.assignment_group') > -1) {
current.addEncodedQuery('Your Query'); // installed
}
})(current, previous);
When you click the magnifying glass, there is a parameter in URL sysparm_target that always differ a little bit. On the change form it's just change_request.assignment_group, and all the reference qualifiers but on change proposal, it has format like change_request.assignment_group.{sys_id format}, it doesn't have qualifiers. Above script helps you add the qualifier to the URL so that you can match the assignment group list both on the standard change template and change request form
Mark it as correct if it is helpful.
BR,
Murali Krishna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2021 11:34 PM
Hi Murali,
Your solution helped us in implementating similar issue, but we are facing issue in sla attachment due to this BR.
We have raised HI ticket and HI responded back with below comments.
Issue: Multiple SLAs are attaching to your incident
Reason:
- We found this was due to the error being thrown by the "SGRE - Standard Change Ownership Group" Business Rule
Solution Proposed:
- To resolve the issue, the Business Rule must be modified so that it is not throwing any error.
- The error seems to be happening when
gs.action
is called. Because in this chain, there is no existinggs.action
. - In response to your question, I do not believe that using the following Code will resolve the issue:
var targetName = gs.action.getGlideURI().getMap().get('sysparm_target');
if (targetName!=null && targetName!='' && targetName! = undefined)
- The error is happening because 'action' cannot be found. Meaning that the script will fail when getGlideURI() is called.
- Therefore, you will likely need to add validation for just gs.action before trying to call any methods on it.
Next Steps:
- I hope that this is helpful to explain how the issue can be resolved.
- If you have been able to review this update and apply the fixes. Then please kindly accept this solution to close this Case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2021 01:50 AM
Hello.
I am facing this error right now.
I don't know how to resolve the error.
Please let me know how to resolve the error.