Copy SysIds in Bulk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2023 12:08 AM - edited 08-17-2023 08:24 AM
Did you ever get any use case where you need to copy SysIDs in bulk from a list view.
Use Case: There is some matrix that you need to validate in your script. You need to store the sysids in a property. One option is to export the CSV with Sys id field using ?CSV&sysparm_default_export_fields=all method, then convert in comma-separated list.
I created a small utility to help copy the sysids from any list. You can download the Utility from here or follow the below steps
Copy SysIDs in Bulk — Share | ServiceNow Developers
- Navigate to System Definitions > UI Actions > Create New
- Give the Name of your choice e.g “Copy Bulk SysIDs”
- Select Table as “Global” so it is available on every list.
- Tick the Client and List choice field checkbox and call the function in the Onclick field
- Write the below code inside the function in the Script field.
var sysIds = g_list.getChecked();
copyToClipboard(sysIds);
Here is a snapshot of the UI Action
6. Save the UI Action and start using it 🙂
Happy Learning!
Thanks
Deepak
Follow me on LinkedIn
- Labels:
-
User Experience and Design
- 517 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2023 09:13 PM
This looks neat!!!