diff --git a/Client-Side Components/UI Actions/Copy Bulk SysIDs/Copy SysIDs b/Client-Side Components/UI Actions/Copy Bulk SysIDs/Copy SysIDs new file mode 100644 index 0000000000..be315f21e3 --- /dev/null +++ b/Client-Side Components/UI Actions/Copy Bulk SysIDs/Copy SysIDs @@ -0,0 +1,2 @@ +var sysIds = g_list.getChecked(); +copyToClipboard(sysIds); diff --git a/Client-Side Components/UI Actions/Copy Bulk SysIDs/readme.md b/Client-Side Components/UI Actions/Copy Bulk SysIDs/readme.md new file mode 100644 index 0000000000..edf919391d --- /dev/null +++ b/Client-Side Components/UI Actions/Copy Bulk SysIDs/readme.md @@ -0,0 +1,33 @@ +# Copy SysIDs in Bulk — ServiceNow Utility + +> Simplify copying checked sys_ids from a list view with a one-click UI Action. + +--- + +## Purpose / Use Case + +Often, you may need to extract sys_ids from records listed in a ServiceNow list view (for scripting, validations, data workflows, etc.). Instead of exporting CSVs or manually gathering IDs, this utility enables direct copying of the selected records’ sys_ids (comma-separated) from the list itself. + +--- + +## How It Works + +It adds a global UI Action (on lists) that, when clicked, collects the sys_ids of checked records and copies them to the clipboard using a small client-side script. + +--- + +## Installation Steps + +1. Navigate to **System Definition > UI Actions**. +2. Create a **new UI Action** with these settings: + - **Name**: e.g. `Copy Bulk SysIDs` + - **Table**: `Global` (so it works on every list) + - **Check** the **Client** and **List** checkboxes (so it appears in list context on client side) +3. In the **Onclick / Client script** field, paste: + + ```javascript + var sysIds = g_list.getChecked(); + copyToClipboard(sysIds); +## Result + +image diff --git a/Client-Side Components/UI Macros/FormBackground/form_background.xml b/Client-Side Components/UI Macros/FormBackground/form_background.xml new file mode 100644 index 0000000000..c8cbd798c5 --- /dev/null +++ b/Client-Side Components/UI Macros/FormBackground/form_background.xml @@ -0,0 +1,25 @@ + + + + diff --git a/Client-Side Components/UI Macros/FormBackground/readme.md b/Client-Side Components/UI Macros/FormBackground/readme.md new file mode 100644 index 0000000000..61ce061aa5 --- /dev/null +++ b/Client-Side Components/UI Macros/FormBackground/readme.md @@ -0,0 +1,55 @@ +# ServiceNow Form Background Macro + +> A lightweight UI Macro to style ServiceNow forms with a custom background and simple element theming (labels, buttons, sections). +--- + +## Features + +* Adds a full-cover background image to a form (supports cover, center positioning). +* Makes table/form/section backgrounds transparent so the background shows through. +* Easy to customize (image path, label styles, button styles, additional CSS selectors). + +## Requirements + +* ServiceNow instance with admin access. +* An image to set as background + +> ⚠️ Note: This macro uses Jelly/CSS that may not work as expected in some Next Experience workspaces or future UI updates. Test in a non-production instance first. + +## Installation + +1. **Upload the background image** + + * Navigate to **System UI > Images** and upload your background image (e.g., `formbg.png`). + +2. **Create the UI Macro** + + * Go to **System UI > UI Macros** and create a new macro (e.g., `ui_form_background`). + * Copy the example macro content below into the UI Macro. + +3. **Create a UI Formatter** + + * Go to **System UI > Formatters**. Create a new formatter for the target table (for example, `incident` table). + * In the *Formatter* field, reference the macro name you created (e.g., `ui_form_background.xml`). + +4. **Add the Formatter to the Form Layout** + + * Open the form layout for the target table (Form Layout / Form Designer) and place the formatter region on the form. + * Save and open a record to see the background applied. + +## Compatibility + +* Tested on ServiceNow classic forms (UI16). May require tweaks for Next Experience, Service Portal, or Workspace. +* If your instance uses strict Content Security Policy (CSP) or image hosting constraints, host the image in a supported location or adapt the implementation. + +## Troubleshooting + +* If no background appears: + + * Confirm the image is uploaded and the filename matches. + * Ensure the formatter is placed on the form layout and published. + * Inspect (browser devtools) to confirm CSS selectors are applied. + +## Result +image +