Custom list view action requirement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
I have this following requirement:
1) In cmdb_ci_business_app tables list view, if anyone selects on or more than one records in the list view and clicks on "Trigger App Criticality&Risk Asmt" ui action from the list choice. I need the following.
1) get sys_ids of all the selected records.
2) Add an info message showing total number of records which were selected.
I have created a UI action (client side), to perform this activity. How can I access the sys_ids and add and info message.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
Hi @RaghavSh
This did work. I've modified the code as below:
function showSelectedSysIds() {
alert('check 1');
var ids = g_list.getChecked();
var selectedIds = ids.split(',');
alert("sys_ids are " + ids);
alert("Length is " + selectedIds.length);
}
But g_form.addInfoMessage doesn't work. So I'm using alert for now. But is there a way to show the message in a better way.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
@HrishabhKumar make sense
1. g_form will not work to show message.
2. Alert is the easy option.
3. What you can try is calling a UI page in your UI action and show the details in desired way.
refer for UI page : https://www.servicenow.com/community/itsm-forum/code-to-call-ui-page-from-ui-action-button/m-p/51738...