UI Action to set Assignment group and Assigned to, to the Opened by user.

Romulus Rodrigu
Tera Expert

I am looking to have a UI Action that would set the Assignment Group and the Assigned to fields to the Opened by user and the group and will take the log on user back to the list view. I am not to good at JavaScripting. If I could get some help.

4 REPLIES 4

JonathanJacob
Mega Sage

Setting the Assigned to field to the opened by user as well as redirecting to the list view should be straight forward. However most likely since your Assigned to Field is dependent on assignment group you might run into some issues. Users can be in multiple groups, unless you have a "primary" group, or your users are only in one group, you would have no way to know what group to assign it to.


Romulus Rodrigu
Tera Expert

Yes you are correct, I would need a primary group so I am working on that as we speak. Now once that is all done and in place how would I go about making this happen?
And Thank you in advance.


Take a look at this SNC Guru Post it might be helpful to you:



http://www.servicenowguru.com/system-ui/ui-macros/add-me-ui-macro-user-group-fields/


Credit goes to Mark Stanger for that one.


Romulus Rodrigu
Tera Expert

I now set my user with a primary group by adding a field in the grmember table. Now any sample scripts that would let me set the Assigned to fields to the Opened by user and then look at the grmember table to find the Opened by user and the group that the primary field is true...
Any help will be great.