Skip to content

Added "Copy SysIds in Bulk" utility #1578

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions UI Actions/Copy Bulk SysIDs/CopyBulkIDs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
//This action will be able to copy the sysids of multiselected records.

Table - Global
List Choice - True
Client - True
onClick - copySysIDs()

Result - All the sysids will be copied as comma-separated strings which you can further copy into a system property for validations

*/

function copySysIDs(){
var sysIds = g_list.getChecked();
copyToClipboard(sysIds);
}
19 changes: 19 additions & 0 deletions UI Actions/Copy Bulk SysIDs/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Did you ever get any use case where you need to copy SysIDs in bulk from a list view?

The use case can be:
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.

![image](https://github.com/user-attachments/assets/90228462-cc67-4a99-b4e0-b1295c46bd67)

Created this small utility to fasten the process of copying bulk sysids

1. Navigate to System Definitions > UI Actions > Create New
2. Give the Name of your choice e.g “Copy Bulk SysIDs”
3. Select Table as “Global” so it is available on every list.
4. Tick the Client and List choice field checkbox and call the function in Onclick field
5. Write below code inside the function in Script field.
**var sysIds = g_list.getChecked();
copyToClipboard(sysIds);**

14 changes: 0 additions & 14 deletions UI Actions/Copy Variable Set/readme.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not seem to be your intention. Make sure you have synced your main branch and create a new branch with just the UI Actions details, without deleting files that exist

This file was deleted.

100 changes: 0 additions & 100 deletions UI Actions/Copy Variable Set/scripts.js

This file was deleted.

Loading