Ui action button to assign Incident
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago - last edited 2 hours ago
Hi,
I want to create a UI Action button on the Incident table named “Assign to Me.”
When a user clicks this button, there should be a pop-up that needs to come and ask form confirmation if user clicks on ok , then the incident should be assigned to the currently logged-in user.
Conditions:
- The Assignment Group field must not be empty.
- Only users who are members of the Assignment Group should be able to see and use this button.
NOTE: the requirement is working properly without having the popup, but when I try to add popup it's not working. Seems to be there is some changes made by servicenow in the latest release where the popup functionality is not working. Please suggest
My script: this is server side script.
Can someone help me in adding pop-up usinge the client as well. It's not working when I tried
Thanks in advance 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago - last edited 2 hours ago
See example screenshot from a Cancel UI Action I have.
- your going to need to give it an action name and check the box Client.
- Then you will need to setup a function name in the onclick
- Then you script will look like this.
function cancel() { g_form.clearMessages();//clear messages var isModified = g_form.modified; if (confirm('Are you sure you want to cancel this story?')) { gsftSubmit(null, g_form.getFormElement(), 'cancel_story'); //This is what is in te action name. } } if (typeof window == 'undefined') setCanceled(); function setCanceled() { //Your code here should be the same that you currently have in your script just needs to be in a fuction like this. current.state = 4; current.update(); action.setRedirectURL(current); }
