Users can create an Incident on behalf of other users from the same department.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2022 08:47 AM
A user can create an incident for him/her self by default.
Also a user can create an incident for other users of the same department.
When a user creating an incident for other users, he/she could able to select users from the same department on the "Caller" field.
I know this is complete,
When I can see the looged in user's name in the 'Caller' field when a new incident form is opened.
The logged in user should able to select a different user from the same department only.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2022 09:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2022 09:36 AM
Hi
If my response is helpful to you, please mark as Correct Answer/Helpful
Please check and let us know.
Thanks 🙂
Shakeel Shaik 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2022 09:32 AM
Hi Akash,
Use Advanced reference qualifier and invoke a script include function which returns the necessary qualifier.
Please take below steps:
1) Configure dictionary for "Caller" field, and make sure that in the "Reference Specification" tab you set the "Use reference qualifier" field to "Advanced" and "Reference qual" field to "javascript:new IncidentFieldQualifiers().getCallerRefQualifier();" without quotes.
2) Create a script include as shown below
var IncidentFieldQualifiers = Class.create();
IncidentFieldQualifiers.prototype = {
initialize: function() {},
getCallerRefQualifier: function() {
if(gs.hasRole("service_desk")) return "";
var department = "";
var gUsr = new GlideRecord("sys_user");
gUsr.addQuery("sys_id", gs.getUserID());
gUsr.query();
if (gUsr.next()) {
department = gUsr.getValue("department");
}
return "department=" + department;
},
type: 'IncidentFieldQualifiers'
};
It may be good idea to exclude admin (gs.hasRole("any_role") by default returns true for admins ) and service desk folks from this as you want service desk to create incidents for people from different departments.
If you have additional qualifiers present in your prod, you may want to tweak this and make sure that your current conditions are also included before returning encoded query.
Thanks and regards,
Subrahmanyam Satti