How to create "Edit" UI Action on the rm_story table?

Naveen Kumar
Tera Contributor

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.

4 REPLIES 4

Paul Deonarine3
Tera Expert
  1. Navigate to the sys_ui_action table in ServiceNow.
  2. Click the "New" button to create a new UI action.
  3. In the form, enter a name for the UI action, such as "Edit Story".
  4. Set the table to rm_story.
  5. Set the "Action name" field to "edit".
  6. Set the "Client" field to "true".
  7. 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.

  1. 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.

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.

Please do right click on the related list header and go to the 'list control' and enable the new or edit button

Prince Arora
Tera Sage
Tera Sage

@Naveen Kumar  ,

 

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.