Assign to me button issue on incident form???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2017 05:01 AM
Hi All,
I have an UI action created on my incident form , here the issue is whenever the user clicks on assigned to me button on incident form it is
clearing the assignment group field value whatever is there and setting the assigned to value to me itself.
But, here i need that the assignment group field value should not be removed.
Below is the code for UI action:
var currentUserID = gs.getUserID();
var userDefaultGroup = '';
var userSysID = '';
var queryUserRecord = new GlideRecord('sys_user');
queryUserRecord.addQuery('sys_id',currentUserID);
queryUserRecord.query();
while (queryUserRecord.next()) {
userDefaultGroup = queryUserRecord.u_default_group;
userSysID = queryUserRecord.sys_id;
}
current.state = 2;
current.assignment_group = userDefaultGroup;
current.assigned_to = userSysID;
action.setRedirectURL(current);
current.update();
Here they are setting the assignment group value based on the users default group, which was set in their user account. But In our instance no user record is set with the default group. How can i fix this issue to set the assignment group and assigned to value if the user clicks on "Assigned to me" button to set the default values...
Please help me on this
Thanks
Madhuri.K
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2017 06:52 AM
Jaspel,
Here i'm not able to see the assigned to me button bcz i'm not part of that group, However when i'm changing the assignment group which i'm part of the same assignment group then also i'm not able to see the assign to me button. Pls help me to resolve this
Thanks
Madhuri.K
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2017 06:55 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2017 07:11 AM
Hi Kalluri,
Reason being the code that is currently written for UI Action does not work on change it implies to on load of forms. So if you open you any ticket which you are part of would show up button. Check for that first. If it works then click & then check if the Assignment group changes on click of Assigned to me button.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2017 06:12 AM
Hi Jaspreet,
Here the "Assigned to me" button use is, Whenever the user clicks on button it should set "Assigned to" the current user and "Assignment group" should be set as one of his groups or default group.
But In our instance We have created a default group field in user table so that users will be able to set their default group. But here no user record has been set up a default group to user records in user table. That is the issue here. Can you suggest me a turnaround here for this one..

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2017 06:19 AM
Hi Sharique,
There's a chance that the user can't read from the group table and security is causing an issue.