From 6ca7f20ad40e9cd470663396a74cd820c1ffb5d8 Mon Sep 17 00:00:00 2001 From: Deepak Negi <120473057+dvn-lazywinner@users.noreply.github.com> Date: Tue, 7 Oct 2025 18:53:55 +0530 Subject: [PATCH 1/7] Update cc all group members.js All active users from the group --- .../Mail Scripts/cc all group members/cc all group members.js | 1 + 1 file changed, 1 insertion(+) diff --git a/Integration/Mail Scripts/cc all group members/cc all group members.js b/Integration/Mail Scripts/cc all group members/cc all group members.js index 0610fe3f33..b513df54f1 100644 --- a/Integration/Mail Scripts/cc all group members/cc all group members.js +++ b/Integration/Mail Scripts/cc all group members/cc all group members.js @@ -8,6 +8,7 @@ // Add your code here var grp = new GlideRecord('sys_user_grmember'); //Query to the group member table grp.addQuery("group", current.assignment_group); //add a filter to query based on the current record's assignment group + grp.addQuery("user.active", true); // all active users grp.query(); while (grp.next()) { email.addAddress('cc', grp.user.email, grp.user.name); //Passing email as name and 2nd and 3rd parameter From b87967967dadb39949a466022752fe8dff4ebd5a Mon Sep 17 00:00:00 2001 From: Deepak Negi <120473057+dvn-lazywinner@users.noreply.github.com> Date: Tue, 7 Oct 2025 18:54:19 +0530 Subject: [PATCH 2/7] Update README.md --- Integration/Mail Scripts/cc all group members/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Integration/Mail Scripts/cc all group members/README.md b/Integration/Mail Scripts/cc all group members/README.md index df1bb3f79a..b74113ba3c 100644 --- a/Integration/Mail Scripts/cc all group members/README.md +++ b/Integration/Mail Scripts/cc all group members/README.md @@ -1,7 +1,7 @@ This mail script can be used to CC all members of a group in the current record context. Use case: -CC all members of the assignment group for the current record. +CC all active members of the assignment group for the current record. Solution: Create the mail script as mentioned in cc all group members.js file and then call the mail script in you email notification using ${mail_script: your mail script name} in the notification body From fdde06ee45e2e86461430ca369e50d5fad184f1d Mon Sep 17 00:00:00 2001 From: Deepak Negi <120473057+dvn-lazywinner@users.noreply.github.com> Date: Sun, 12 Oct 2025 23:53:16 +0530 Subject: [PATCH 3/7] Create readme.md Readme file to use formbackground via UI Macro --- .../UI Macros/FormBackground/readme.md | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Client-Side Components/UI Macros/FormBackground/readme.md 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..ed51224d8b --- /dev/null +++ b/Client-Side Components/UI Macros/FormBackground/readme.md @@ -0,0 +1,65 @@ +# 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 + + +## Contributing + +Contributions, improvements, and pull requests are welcome. Please follow these guidelines: + +* Fork the repo and create feature branches for changes. +* Keep the macro CSS minimal and well-commented. +* Include screenshots and a short description for visual changes. + +If you want help adapting this macro to your instance (Next Experience / Workspaces / Service Portal), open an issue or reach out via the repository. From 0edbaf59af6326683cf5d49175643e7779cfb4f6 Mon Sep 17 00:00:00 2001 From: Deepak Negi <120473057+dvn-lazywinner@users.noreply.github.com> Date: Sun, 12 Oct 2025 23:54:35 +0530 Subject: [PATCH 4/7] Create form_background.xml Form background script --- .../FormBackground/form_background.xml | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Client-Side Components/UI Macros/FormBackground/form_background.xml 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 @@ + + + + From 48c1d9aee0c0ea53da0d895633c8b6529e598f1d Mon Sep 17 00:00:00 2001 From: Deepak Negi <120473057+dvn-lazywinner@users.noreply.github.com> Date: Mon, 13 Oct 2025 00:03:12 +0530 Subject: [PATCH 5/7] Update README.md reverted to original --- Integration/Mail Scripts/cc all group members/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Integration/Mail Scripts/cc all group members/README.md b/Integration/Mail Scripts/cc all group members/README.md index b74113ba3c..df1bb3f79a 100644 --- a/Integration/Mail Scripts/cc all group members/README.md +++ b/Integration/Mail Scripts/cc all group members/README.md @@ -1,7 +1,7 @@ This mail script can be used to CC all members of a group in the current record context. Use case: -CC all active members of the assignment group for the current record. +CC all members of the assignment group for the current record. Solution: Create the mail script as mentioned in cc all group members.js file and then call the mail script in you email notification using ${mail_script: your mail script name} in the notification body From 0392896303142ad1ea8efd10eba068114c509040 Mon Sep 17 00:00:00 2001 From: Deepak Negi <120473057+dvn-lazywinner@users.noreply.github.com> Date: Mon, 13 Oct 2025 00:03:50 +0530 Subject: [PATCH 6/7] Update cc all group members.js reverted to original --- .../Mail Scripts/cc all group members/cc all group members.js | 1 - 1 file changed, 1 deletion(-) diff --git a/Integration/Mail Scripts/cc all group members/cc all group members.js b/Integration/Mail Scripts/cc all group members/cc all group members.js index b513df54f1..0610fe3f33 100644 --- a/Integration/Mail Scripts/cc all group members/cc all group members.js +++ b/Integration/Mail Scripts/cc all group members/cc all group members.js @@ -8,7 +8,6 @@ // Add your code here var grp = new GlideRecord('sys_user_grmember'); //Query to the group member table grp.addQuery("group", current.assignment_group); //add a filter to query based on the current record's assignment group - grp.addQuery("user.active", true); // all active users grp.query(); while (grp.next()) { email.addAddress('cc', grp.user.email, grp.user.name); //Passing email as name and 2nd and 3rd parameter From 65c5afee3aafe20288b9e74ca7110d330d488760 Mon Sep 17 00:00:00 2001 From: Deepak Negi <120473057+dvn-lazywinner@users.noreply.github.com> Date: Mon, 13 Oct 2025 00:36:42 +0530 Subject: [PATCH 7/7] Update readme.md updated readmefile --- .../UI Macros/FormBackground/readme.md | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/Client-Side Components/UI Macros/FormBackground/readme.md b/Client-Side Components/UI Macros/FormBackground/readme.md index ed51224d8b..61ce061aa5 100644 --- a/Client-Side Components/UI Macros/FormBackground/readme.md +++ b/Client-Side Components/UI Macros/FormBackground/readme.md @@ -53,13 +53,3 @@ ## Result image - -## Contributing - -Contributions, improvements, and pull requests are welcome. Please follow these guidelines: - -* Fork the repo and create feature branches for changes. -* Keep the macro CSS minimal and well-commented. -* Include screenshots and a short description for visual changes. - -If you want help adapting this macro to your instance (Next Experience / Workspaces / Service Portal), open an issue or reach out via the repository.