Ui Action to open a dialog page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2020 07:35 PM
I need an UI Action on Incident Table(Transfer) visible to member of current group once clicked to open a modal window with Assignment Group field only to select a value(pre-filter only for support type groups).Once we put the value for Assignment Group field there should be an update button in the same modal window and once clicked on it it will automatically update the incident with stated assignment group value and state should be updated to new.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2020 11:53 PM
Creating UI Action:
- Go to UI Action under System UI and create it.
- Create a Script include for validating the specific Group like this and add that to the Condition field in UI Action.
- new GroupCheck().isAMember() / gs.getUser().isMemberOf
- Give an Action Name to your UI Action
- Set the OnClick Field something like "dothis()".
- Script start with "function dothis(){}"
- Use GlideModel/GlideDialogWindow to open a Model popup once you click on it. For this you need to create UI Page.
Create UI Page
- HTML : create html button and use <g:ui_reference> to display Assignment Groups. Refer to some doc on how to use <g:ui_reference>.
- Client Script: Use "gel" to get the reference field value and do g_form.setValue. After that use "gsftSubmit(null, g_form.getFormElement(), "<action name given in UI Action>");"
Thanks,
Narsing

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2023 03:14 AM - edited ‎06-05-2023 12:36 AM
Hi,
I was able to develope a similar requirement with help of the following material:
Create custom UI Page in a popup: https://www.servicenow.com/community/developer-articles/custom-ui-page-in-a-popup/ta-p/2319550
Add the UI page pop up dialog to UI action: https://servicenowguru.com/system-ui/glidedialogwindow-advanced-popups-ui-pages/