How to create "Edit" UI Action on the rm_story table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2023 12:57 AM
I need to create a "Edit" Ui Action for rm_story table.
When a user clicks on this ui action user should be able to choose stories from this table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2023 08:52 PM
- Navigate to the sys_ui_action table in ServiceNow.
- Click the "New" button to create a new UI action.
- In the form, enter a name for the UI action, such as "Edit Story".
- Set the table to rm_story.
- Set the "Action name" field to "edit".
- Set the "Client" field to "true".
- In the "Script" field, enter the following code:
function openEditForm() {
var table = 'rm_story';
var form = new GlideDialogForm('Edit ' + table, table);
form.addParm('sys_id', g_list.getChecked());
form.render();
}
This code will create a function called openEditForm that opens a GlideDialogForm to edit the selected stories.
- Click "Submit" to save the UI action.
Now, when a user selects one or more stories in the rm_story table and clicks on the "Edit Story" UI action, the openEditForm function will be called, and a GlideDialogForm will open to edit the selected stories.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2023 01:05 AM
Hi @Paul Deonarine3 ,
Actually I am not editing the stories.
I am adding stories to the related list in the change form.
Its like "new" and "edit" button on the related list.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2023 11:35 AM
Please do right click on the related list header and go to the 'list control' and enable the new or edit button
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2023 11:04 AM
You want the UI action on "rm_sprint" table right?
Please enable it from the List control.
If my answer solved your issue, please mark my answer as ✅Correct & 👍Helpful based on the Impact.