GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ServiceNowDevProgram/code-snippets: ServiceNow's Code Snippets community repository, managed by the Developer Program and the sndevs community.

BranchesTags
Open more actions menu

Latest commit

 

History

4,252 Commits
4,252 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
Client-Side Components
Client-Side Components
 
 
Core ServiceNow APIs
Core ServiceNow APIs
 
 
Integration
Integration
 
 
Modern Development
Modern Development
 
 
Server-Side Components
Server-Side Components
 
 
Specialized Areas
Specialized Areas
 
 
assets
assets
 
 
pages
pages
 
 
.gitignore
.gitignore
 
 
AGENTS.md
AGENTS.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
PAGES.md
PAGES.md
 
 
README.md
README.md
 
 
_config.yml
_config.yml
 
 
count-files.js
count-files.js
 
 
index.html
index.html
 
 
sitemap.xml
sitemap.xml
 
 

Repository files navigation

Code Snippets Banner

Contributions Welcome Hacktoberfest

ServiceNow Code Snippets Repository

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.

šŸ“ Contribution Guidelines | šŸ“š Browse Categories | šŸ” How to Use

Interested in our other ServiceNow Hacktoberfest projects? See the main repository here or see our official blog post here.

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.

Disclaimer

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.

  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.

  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.

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.

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.

šŸ””šŸ””šŸ””
CONTRIBUTORS must follow all guidelines in CONTRIBUTING.md or run the risk of having your Pull Requests labeled as spam.
šŸ””šŸ””šŸ””

Table of Contents

  • How to Use This Repository
  • Repository Organization
  • Finding Snippets
  • Folder Structure
  • Contributing
  • Disclaimer

How to Use This Repository

This repository contains code snippets that you can use in your ServiceNow instance. Here's how to make the most of it:

  1. Browse by Category: Navigate through the six major categories 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 to help others.

Repository Organization

The repository is organized into 6 major categories that cover all aspects of ServiceNow development:

šŸ“š Core ServiceNow APIs

Essential ServiceNow JavaScript APIs and classes including GlideRecord, GlideAjax, GlideSystem, GlideDate, GlideDateTime, and other foundational APIs.

āš™ļø Server-Side Components

Server-side code including Background Scripts, Business Rules, Script Includes, Scheduled Jobs, Transform Map Scripts, and other server-executed components.

šŸ–„ļø Client-Side Components

Client-side code including Client Scripts, Catalog Client Scripts, UI Actions, UI Scripts, UI Pages, and UX framework components.

šŸš€ Modern Development

Modern ServiceNow development approaches including Service Portal, NOW Experience Framework, GraphQL implementations, and ECMAScript 2021 features.

šŸ”— Integration

External system integrations, data import/export utilities, RESTMessageV2 examples, Mail Scripts, MIDServer utilities, and attachment handling.

šŸŽÆ Specialized Areas

Domain-specific functionality including CMDB utilities, ITOM scripts, Performance Analytics, ATF Steps, Agile Development tools, and other specialized use cases.

Finding Snippets

There are several ways to find the snippets you need:

  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.

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)

For example:

Core ServiceNow APIs/
  ā”œā”€ā”€ GlideRecord/
  │   ā”œā”€ā”€ Query Performance Optimization/
  │   │   ā”œā”€ā”€ README.md
  │   │   ā”œā”€ā”€ basic_query.js
  │   │   └── optimized_query.js

We invite you to contribute!

We welcome contributions from the ServiceNow developer community! Your knowledge and experience can help others solve common challenges.

🌐 Contribute from the Web (No Setup Needed!)

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 guide before submitting.

What makes a good contribution?

  • 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

Leaderboard

Looking for the old leaderboard? We've moved the leaderboard to the overarching Hacktoberfest repository and have expanded its scope to all participating projects.

About

ServiceNow's Code Snippets community repository, managed by the Developer Program and the sndevs community.

github.com/ServiceNowDevProgram/Hacktoberfest

Topics

hacktoberfesthacktoberfest-acceptedhacktoberfest2021hacktoberfest2022hacktoberfest2023hacktoberfest2024hacktoberfest2025servicenow

Resources

Readme

Contributing

Contributing
Activity
Custom properties

Stars

444 stars

Watchers

36 watching

Forks

927 forks
Report repository

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Ɨ600. No cookies required.