From 0b63a24b8cb6a539ec88d11586bfc056e8afb3ad Mon Sep 17 00:00:00 2001
From: Ayan Ahmed Khan <145579926+AyanAhmedKhan@users.noreply.github.com>
Date: Sat, 4 Oct 2025 17:06:48 +0530
Subject: [PATCH 1/3] Revise README for clarity and community involvement
Updated the README to enhance community engagement and clarify repository usage.
---
README.md | 190 ++++++++++++++++++++++++++++++++++++++++++++----------
1 file changed, 157 insertions(+), 33 deletions(-)
diff --git a/README.md b/README.md
index a075434a3d..92d6c26900 100644
--- a/README.md
+++ b/README.md
@@ -1,66 +1,190 @@
-
+# π ServiceNow Code Snippets
-Welcome to ServiceNow's Code Snippets community repository, managed by the Developer Program and the sndevs Slack community.
+
-Inside this repository, you will find community submitted code-snippets and their variants for different use-cases.
+
-> Interested in our other ServiceNow Hacktoberfest projects? See the main repository [here](https://github.com/ServiceNowDevProgram/Hacktoberfest) or see our official blog post [here](https://devlink.sn/hacktoberfest).
+**A community-driven collection of ServiceNow code snippets and solutions**
-**Note:** ServiceNowDevProgram has many repositories that can be imported directly into ServiceNow, this is not one of them; This repository is meant to be edited directly in GitHub or any other Git-enabled IDE like VS Code.
+[](CONTRIBUTING.md)
+[](https://github.com/ServiceNowDevProgram/Hacktoberfest)
+[](LICENSE)
-## Disclaimer
+[Explore Snippets](#-repository-structure) Β· [Contribute](#-how-to-contribute) Β· [Join Community](https://sndevs.com)
-Please note the following:
+
-1. **Community-Sourced Code**: The code found in this repository is contributed by members of the community and has not been vetted or officially endorsed by the repository owners.
+---
-2. **Use at Your Own Risk**: Users are advised to exercise caution and thoroughly review the code before implementing it in their ServiceNow instances. We strongly recommend a comprehensive review to ensure the code aligns with your specific requirements and security standards.
+## π About
-3. **Reporting Mistakes and Issues**: If you come across any mistakes, issues, or improvements in the code, we encourage you to report them and consider contributing to the repository by submitting corrections or enhancements.
+Welcome to the **ServiceNow Code Snippets** repository - your go-to resource for practical, real-world ServiceNow code examples. Managed by the ServiceNow Developer Program and the vibrant **sndevs** Slack community, this repository features battle-tested code snippets submitted by developers like you.
-4. **No Warranty or Support**: This repository is provided as-is, without any warranties or guarantees. It does not come with official support from the ServiceNow team or the repository owners.
+> π **Hacktoberfest Participant**: Check out our [main Hacktoberfest repository](https://github.com/ServiceNowDevProgram/Hacktoberfest) and [official blog post](https://devlink.sn/hacktoberfest) for more projects!
-By using the code from this repository, you acknowledge that you have read and understood this disclaimer. Your use of the code is at your own discretion and risk.
+### β¨ What Makes This Repository Special
-We appreciate your participation and contributions to this community-driven project. Let's collaborate to make it a valuable resource for ServiceNow developers and enthusiasts.
+- π **Community-Powered**: Real solutions from real developers
+- π **Comprehensive**: Covers all aspects of ServiceNow development
+- π **Always Growing**: Regular updates and new snippets
+- π― **Practical**: Code you can actually use in production
+- π€ **Collaborative**: Built by developers, for developers
-πππ
+
+| Resource | Description |
+|----------|-------------|
+| [sndevs Slack](https://sndevs.com) | Join thousands of ServiceNow developers |
+| [Developer Portal](https://developer.servicenow.com) | Official ServiceNow documentation |
+| [Community Forum](https://www.servicenow.com/community/) | Ask questions and share knowledge |
+| [Developer Blog](https://developer.servicenow.com/blog.do) | Latest news and tutorials |
+
+
+
+---
+
+## π License
+
+This repository is available under the MIT License. See [LICENSE](LICENSE) for more details.
+
+---
+
+## π Acknowledgments
+
+Special thanks to:
+- All our amazing [contributors](../../graphs/contributors)
+- The ServiceNow Developer Program team
+- The sndevs community moderators
+- Everyone who has starred, forked, or shared this project
-## We invite you to contribute!
+---
-To contribute, just follow these steps:
+
-1. Fork this repo (you get a point just by forking!)
-2. Create a new branch on your fork
-3. Add/Update the repo
-4. Submit a pull request!
+**β Star this repo if you find it helpful!**
-That's it! More detailed contribution instructions can be found [here](CONTRIBUTING.md)
+Made with β€οΈ by the ServiceNow Developer Community
-## Leaderboard
+[Report Bug](../../issues) Β· [Request Feature](../../issues) Β· [View Statistics](../../pulse)
-Looking for the old leaderboard? We've moved the leaderboard to the overarching [Hacktoberfest](https://github.com/ServiceNowDevProgram/Hacktoberfest#leaders) repository and have expanded its scope to all participating projects.
+
From a028d6bacbe2a788617280239e99a4dde5b528aa Mon Sep 17 00:00:00 2001
From: Ayan Ahmed Khan <145579926+AyanAhmedKhan@users.noreply.github.com>
Date: Sun, 5 Oct 2025 17:59:03 +0530
Subject: [PATCH 2/3] Add web contribution instructions to README
Added section on contributing directly from the web without setup.
---
README.md | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 92d6c26900..f2541b85aa 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,6 @@
[](CONTRIBUTING.md)
[](https://github.com/ServiceNowDevProgram/Hacktoberfest)
-[](LICENSE)
[Explore Snippets](#-repository-structure) Β· [Contribute](#-how-to-contribute) Β· [Join Community](https://sndevs.com)
@@ -102,6 +101,19 @@ We'd love your contributions! Here's how to get started:
5. **Push** to your branch (`git push origin feature/amazing-snippet`)
6. **Open** a Pull Request
+## π Contribute from the Web (No Setup Needed!)
+
+You can contribute directly from your browser β no cloning required!
+
+1. Click **Fork** at the top-right corner of this page
+2. Open the folder where you want to add or edit a file
+3. Click **Add file β Create new file** (or edit an existing one)
+4. Scroll down, add a **commit message**, and select
+ > "**Create a new branch for this commit and start a pull request**"
+5. Click **Propose changes β Create pull request**
+
+π Thatβs it β your contribution will be reviewed soon!
+
### π Contribution Guidelines
> π **IMPORTANT**: All contributors **must** follow the guidelines in [CONTRIBUTING.md](CONTRIBUTING.md) or risk having PRs labeled as spam.
From 9883d955dd5a3d051be61b09c2cb8c8f0f101a74 Mon Sep 17 00:00:00 2001
From: Earl Duque <31702109+earlduque@users.noreply.github.com>
Date: Sun, 5 Oct 2025 09:03:22 -0700
Subject: [PATCH 3/3] merge PRs
---
README.md | 241 +++++++++++++++++++++---------------------------------
1 file changed, 92 insertions(+), 149 deletions(-)
diff --git a/README.md b/README.md
index f2541b85aa..21673ccef0 100644
--- a/README.md
+++ b/README.md
@@ -1,202 +1,145 @@
-# π ServiceNow Code Snippets
-
-
-

-**A community-driven collection of ServiceNow code snippets and solutions**
+
[](CONTRIBUTING.md)
[](https://github.com/ServiceNowDevProgram/Hacktoberfest)
-[Explore Snippets](#-repository-structure) Β· [Contribute](#-how-to-contribute) Β· [Join Community](https://sndevs.com)
-
----
-
-## π About
-
-Welcome to the **ServiceNow Code Snippets** repository - your go-to resource for practical, real-world ServiceNow code examples. Managed by the ServiceNow Developer Program and the vibrant **sndevs** Slack community, this repository features battle-tested code snippets submitted by developers like you.
-
-> π **Hacktoberfest Participant**: Check out our [main Hacktoberfest repository](https://github.com/ServiceNowDevProgram/Hacktoberfest) and [official blog post](https://devlink.sn/hacktoberfest) for more projects!
-
-### β¨ What Makes This Repository Special
-
-- π **Community-Powered**: Real solutions from real developers
-- π **Comprehensive**: Covers all aspects of ServiceNow development
-- π **Always Growing**: Regular updates and new snippets
-- π― **Practical**: Code you can actually use in production
-- π€ **Collaborative**: Built by developers, for developers
-
----
-
-## ποΈ Repository Structure
-
-
-
-|
+# ServiceNow Code Snippets Repository
-### π [Core ServiceNow APIs](Core%20ServiceNow%20APIs/)
-Essential JavaScript APIs and classes
-- GlideRecord & GlideAjax
-- GlideSystem & GlideUser
-- GlideDate & GlideDateTime
-- Core utility functions
+Welcome to ServiceNow's Code Snippets community repository, managed by the Developer Program and the sndevs Slack community.
-### βοΈ [Server-Side Components](Server-Side%20Components/)
-Server-executed code patterns
-- Background Scripts
-- Business Rules & ACLs
-- Script Includes
-- Scheduled Jobs & Transform Maps
+Inside this repository, you will find community submitted code-snippets and their variants for different use-cases.
-### π₯οΈ [Client-Side Components](Client-Side%20Components/)
-Browser-based functionality
-- Client Scripts & UI Policies
-- Catalog Client Scripts
-- UI Actions & UI Scripts
-- UX Framework components
+**[π Contribution Guidelines](CONTRIBUTING.md)** | **[π Browse Categories](#repository-organization)** | **[π How to Use](#how-to-use-this-repository)**
- |
-
+> Interested in our other ServiceNow Hacktoberfest projects? See the main repository [here](https://github.com/ServiceNowDevProgram/Hacktoberfest) or see our official blog post [here](https://devlink.sn/hacktoberfest).
-### π [Modern Development](Modern%20Development/)
-Contemporary ServiceNow approaches
-- Service Portal widgets
-- NOW Experience Framework
-- GraphQL implementations
-- ECMAScript 2021+ features
+**Note:** ServiceNowDevProgram has many repositories that can be imported directly into ServiceNow, this is not one of them; This repository is meant to be edited directly in GitHub or any other Git-enabled IDE like VS Code.
-### π [Integration](Integration/)
-External system connectivity
-- REST & SOAP integrations
-- Mail Scripts & Webhooks
-- MIDServer utilities
-- Attachment handling
+## Disclaimer
-### π― [Specialized Areas](Specialized%20Areas/)
-Domain-specific solutions
-- CMDB & Discovery
-- ITOM & Performance Analytics
-- ATF Steps & Test utilities
-- Agile Development tools
+Please note the following:
- |
-
-
+1. **Community-Sourced Code**: The code found in this repository is contributed by members of the community and has not been vetted or officially endorsed by the repository owners.
----
+2. **Use at Your Own Risk**: Users are advised to exercise caution and thoroughly review the code before implementing it in their ServiceNow instances. We strongly recommend a comprehensive review to ensure the code aligns with your specific requirements and security standards.
-## π How to Contribute
+3. **Reporting Mistakes and Issues**: If you come across any mistakes, issues, or improvements in the code, we encourage you to report them and consider contributing to the repository by submitting corrections or enhancements.
-We'd love your contributions! Here's how to get started:
+4. **No Warranty or Support**: This repository is provided as-is, without any warranties or guarantees. It does not come with official support from the ServiceNow team or the repository owners.
-### Quick Start
+By using the code from this repository, you acknowledge that you have read and understood this disclaimer. Your use of the code is at your own discretion and risk.
-1. **Fork** this repository (you get a point just for forking! π)
-2. **Create** a new branch (`git checkout -b feature/amazing-snippet`)
-3. **Add** your code snippet following our [structure guidelines](CONTRIBUTING.md)
-4. **Commit** your changes (`git commit -m 'Add amazing snippet for X'`)
-5. **Push** to your branch (`git push origin feature/amazing-snippet`)
-6. **Open** a Pull Request
+We appreciate your participation and contributions to this community-driven project. Let's collaborate to make it a valuable resource for ServiceNow developers and enthusiasts.
-## π Contribute from the Web (No Setup Needed!)
+πππ
+**_CONTRIBUTORS must follow all guidelines in [CONTRIBUTING.md](CONTRIBUTING.md)_** or run the risk of having your Pull Requests labeled as spam.
+πππ
-You can contribute directly from your browser β no cloning required!
+## Table of Contents
-1. Click **Fork** at the top-right corner of this page
-2. Open the folder where you want to add or edit a file
-3. Click **Add file β Create new file** (or edit an existing one)
-4. Scroll down, add a **commit message**, and select
- > "**Create a new branch for this commit and start a pull request**"
-5. Click **Propose changes β Create pull request**
+- [How to Use This Repository](#how-to-use-this-repository)
+- [Repository Organization](#repository-organization)
+- [Finding Snippets](#finding-snippets)
+- [Folder Structure](#folder-structure)
+- [Contributing](#we-invite-you-to-contribute)
+- [Disclaimer](#disclaimer)
-π Thatβs it β your contribution will be reviewed soon!
+## How to Use This Repository
-### π Contribution Guidelines
+This repository contains code snippets that you can use in your ServiceNow instance. Here's how to make the most of it:
-> π **IMPORTANT**: All contributors **must** follow the guidelines in [CONTRIBUTING.md](CONTRIBUTING.md) or risk having PRs labeled as spam.
+1. **Browse by Category**: Navigate through the [six major categories](#repository-organization) to find snippets relevant to your needs.
+2. **Copy and Adapt**: Once you find a useful snippet, copy the code and adapt it to your specific use case in your ServiceNow instance.
+3. **Read the Documentation**: Each snippet folder contains a README.md file that explains how the snippet works and how to implement it.
+4. **Search by Topic**: Use GitHub's search functionality to find snippets by keywords (e.g., "GlideRecord", "REST", "UI Action").
+5. **Contribute Your Own**: If you have a useful snippet, consider [contributing](#we-invite-you-to-contribute) to help others.
-**Key Points:**
-- Follow the existing folder structure
-- Include clear documentation and comments
-- Provide real-world use cases
-- Test your code before submitting
-- Use descriptive commit messages
+## Repository Organization
-**Not sure where to start?** Check out issues labeled `good-first-issue` or `help-wanted`!
+The repository is organized into **6 major categories** that cover all aspects of ServiceNow development:
----
-
-## β οΈ Important Disclaimer
-
-
-Click to read full disclaimer
-
-### Community-Sourced Content
-
-**Please note the following:**
-
-1. **Not Officially Endorsed**: Code in this repository is community-contributed and not officially vetted or endorsed by ServiceNow or repository owners.
-
-2. **Use at Your Own Risk**: Always review code thoroughly before implementing in your ServiceNow instances. Test in sub-production environments first.
-
-3. **Report Issues**: Found a bug or improvement? Please [open an issue](../../issues) or submit a correction.
-
-4. **No Warranty**: This repository is provided "as-is" without warranties or guarantees. No official support is provided.
+### π [Core ServiceNow APIs](Core%20ServiceNow%20APIs/)
+Essential ServiceNow JavaScript APIs and classes including GlideRecord, GlideAjax, GlideSystem, GlideDate, GlideDateTime, and other foundational APIs.
-5. **Security First**: Always validate code against your organization's security standards before deployment.
+### βοΈ [Server-Side Components](Server-Side%20Components/)
+Server-side code including Background Scripts, Business Rules, Script Includes, Scheduled Jobs, Transform Map Scripts, and other server-executed components.
-**By using code from this repository, you acknowledge you've read and understood this disclaimer.**
+### π₯οΈ [Client-Side Components](Client-Side%20Components/)
+Client-side code including Client Scripts, Catalog Client Scripts, UI Actions, UI Scripts, UI Pages, and UX framework components.
-
+### π [Modern Development](Modern%20Development/)
+Modern ServiceNow development approaches including Service Portal, NOW Experience Framework, GraphQL implementations, and ECMAScript 2021 features.
----
+### π [Integration](Integration/)
+External system integrations, data import/export utilities, RESTMessageV2 examples, Mail Scripts, MIDServer utilities, and attachment handling.
-## π Recognition
+### π― [Specialized Areas](Specialized%20Areas/)
+Domain-specific functionality including CMDB utilities, ITOM scripts, Performance Analytics, ATF Steps, Agile Development tools, and other specialized use cases.
-View our contributor leaderboard and stats in the [Hacktoberfest repository](https://github.com/ServiceNowDevProgram/Hacktoberfest#leaders)!
+## Finding Snippets
----
+There are several ways to find the snippets you need:
-## π Community & Resources
+1. **By Category**: Browse the six major categories listed above.
+2. **By Search**: Use GitHub's search functionality with keywords like:
+ - API names: `GlideRecord`, `GlideSystem`, `GlideAjax`
+ - Component types: `Business Rule`, `Client Script`, `UI Action`
+ - Functionality: `REST`, `SOAP`, `Import`, `Export`
+ - Use cases: `Authentication`, `Notification`, `Workflow`
-
+3. **By Tags**: Many snippets include common keywords in their README files that can be searched.
-| Resource | Description |
-|----------|-------------|
-| [sndevs Slack](https://sndevs.com) | Join thousands of ServiceNow developers |
-| [Developer Portal](https://developer.servicenow.com) | Official ServiceNow documentation |
-| [Community Forum](https://www.servicenow.com/community/) | Ask questions and share knowledge |
-| [Developer Blog](https://developer.servicenow.com/blog.do) | Latest news and tutorials |
+## Folder Structure
-
+The repository follows a consistent structure to make navigation easier:
----
+```
+Top-Level Category/
+ βββ Sub-Category/
+ β βββ Specific Snippet/
+ β β βββ README.md # Description and usage instructions
+ β β βββ snippet_file.js # The actual code snippet
+ β β βββ variant.js # Variations of the snippet (if applicable)
+```
-## π License
+For example:
+```
+Core ServiceNow APIs/
+ βββ GlideRecord/
+ β βββ Query Performance Optimization/
+ β β βββ README.md
+ β β βββ basic_query.js
+ β β βββ optimized_query.js
+```
-This repository is available under the MIT License. See [LICENSE](LICENSE) for more details.
+## We invite you to contribute!
----
+We welcome contributions from the ServiceNow developer community! Your knowledge and experience can help others solve common challenges.
-## π Acknowledgments
+## π Contribute from the Web (No Setup Needed!)
-Special thanks to:
-- All our amazing [contributors](../../graphs/contributors)
-- The ServiceNow Developer Program team
-- The sndevs community moderators
-- Everyone who has starred, forked, or shared this project
+This repository has been approved by Hacktoberfest in spirit of learning source control and getting started in your open-source journey. You can contribute directly from your browser without needing a ServiceNow instance:
----
+1. Click **Fork** at the top-right corner of this page
+2. Open the folder where you want to add or edit a file
+3. Click **Add file β Create new file** (or edit an existing one)
+4. Scroll down, add a **commit message**, and select
+ > "**Create a new branch for this commit and start a pull request**"
+5. Click **Propose changes β Create pull request**
-
+That's it! **For detailed contribution instructions, please read our [CONTRIBUTING.md](CONTRIBUTING.md) guide before submitting.**
-**β Star this repo if you find it helpful!**
+### What makes a good contribution?
-Made with β€οΈ by the ServiceNow Developer Community
+- **Useful snippets** that solve common ServiceNow development challenges
+- **Well-documented code** with clear comments explaining how it works
+- **Proper organization** following the repository structure
+- **Variations** of snippets for different use cases when applicable
-[Report Bug](../../issues) Β· [Request Feature](../../issues) Β· [View Statistics](../../pulse)
+## Leaderboard
-
+Looking for the old leaderboard? We've moved the leaderboard to the overarching [Hacktoberfest](https://github.com/ServiceNowDevProgram/Hacktoberfest#leaders) repository and have expanded its scope to all participating projects.