forked from ServiceNowDevProgram/code-snippets
-
Notifications
You must be signed in to change notification settings - Fork 0
inactive users in sys_user table #1
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
Open
divyajetti9
wants to merge
598
commits into
divyajetti9:divyajetti9-Gliderecord-inactive-users
Choose a base branch
from
ServiceNowDevProgram:main
base: divyajetti9-Gliderecord-inactive-users
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
inactive users in sys_user table #1
divyajetti9
wants to merge
598
commits into
divyajetti9:divyajetti9-Gliderecord-inactive-users
from
ServiceNowDevProgram:main
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* script.js * README.md
* Create README.md for the data Normalizer * Create dataNormalizer.js
This script scans the description field of a record for patterns that resemble sensitive personal data and masks them to ensure privacy and compliance. It targets the following data types using regular expressions: Credit Card Numbers: Detects both continuous digits (13–16 digits) and spaced/dashed formats (e.g., 1234-5678-9012-3456). Social Security Numbers (SSNs): Matches the standard US format (XXX-XX-XXXX). Phone Numbers: Identifies various formats including international and local styles. If any of these patterns are found, the script replaces them with masked placeholders (e.g., ****-****-****-**** for credit cards) and updates the description field accordingly. It also logs messages to the system and displays info messages to notify users of the masking actions taken.
This script is designed to automatically convert the value of the Annual Budget field (annual_budget) from its original currency to USD. It uses the fx_currency and fx_rate tables to fetch the latest exchange rates and performs the conversion only when valid data is available.
🔍 Key Features:
Field Focus: Converts the annual_budget field based on the currency specified in budget_currency.
Validation: Ensures both the currency code and amount are valid before proceeding.
Currency Check: If the currency is already USD, it bypasses conversion.
Exchange Rate Lookup: Retrieves the most recent exchange rates for both the source currency and USD.
Conversion Logic: Applies the formula
USD Amount=(Original AmountSource Rate)×USD Rate\text{USD Amount} = \left(\frac{\text{Original Amount}}{\text{Source Rate}}\right) \times \text{USD Rate}USD Amount=(Source RateOriginal Amount)×USD Rate
Error Handling: Clears the USD field if any required data is missing or invalid.
This script ensures accurate and up-to-date currency conversion for budgeting purposes and is well-commented for maintainability and clarity.
Currency conversion
Script Include Usage Tracker
Sensitive Data Masking Script for Description Field
* CloseChildCases.js * README.md * README.md * CloseChildCases.js * README.md
* improved read me * added just a tadd more
* Create Copy Bulk SysIDs Copy Bulk Sysid UI Action as a List Choice * Delete Client-Side Components/UI Actions/Copy Bulk SysIDs Selected wrong folder * Create Copy Bulk Sysids Copy Bulk Sysids from List view * Create README.md Readme file for instructions and usage for Copying Bulk Sysids * Rename Copy Bulk Sysids to Copy Bulk Sysids.js Updated extension
* Create Readme.md * Create Smart Attachment Size Limiter.js * Delete Server-Side Components/Business Rules/Smart Attachment Size Limiter directory * Add UserLocationUtils for retrieving user location * Add Readme for User Location Validator solution This document explains the User Location Validator solution, detailing how it restricts form submissions based on user location. * Add README for User Location Validator solution This document explains the User Location Validator solution, which restricts ServiceNow form submissions based on user location. It details the functionality of the Script Include and Client Script involved in the validation process. * Implement user location validation on form submission * Refactor location validation using Haversine formula * Revise README for User Location Validator Updated the README to clarify the User Location Validator functionality, including details on how it works, sample output, and usage notes. * Revise Readme for User Location Validator script Updated the readme to clarify the functionality and usage of the User Location Validator script, including details on how it works and sample output. * Implement UserLocationUtils for location retrieval * Update Readme with corrected script references * Delete Server-Side Components/Script Includes/Dynamic Location Validation Approach/Readme.md * Delete Server-Side Components/Script Includes/Dynamic Location Validation Approach/UserLocationUtils.js
Expanded the README to provide detailed usage instructions, functionality, and use cases for the Clone User script.
* Add the UX Client Script Include * Include README and usage
* Create CapitalizeTitleWords.js * Create README.md
* Create softwareCreationREADME.md * Create softwareCreation.js
* Create proactive_change_reminder.js This commit adds a Scheduled Script that proactively notifies assigned agents of Priority 1 Change Requests due within 24 hours. * Create README.md
* README.md * pdfletter.js * Delete Server-Side Components/Business Rules/PdfletterGeneration directory * README.md * reply.js
…d in HR case it will create pdf letter. (#2244) * README.md * pdfletter.js * Delete Server-Side Components/Business Rules/PdfletterGeneration directory * README.md * letter.js
…2246) * Add attachment format validation for incidents * Add README for Attachment Format Validator Added documentation for the Attachment Format Validator, detailing its functionality, key features, and configuration. * Rename AttachmentFormatValidatorClientScript.js to AttachmentFormatValidator.js * updating the directory * Fixing the naming convention * Moving file to another folder
…L injection (#2251) Co-authored-by: Daniel Madsen <daniel@madsen.local>
…#2610) * Code for Moveworks bot messages for Flow to include url links * Create script.js * Create readme.md * Delete Moveworks messages html for Flow
…#2613) * Initial create script.js * Create README.md * Updated mistyped variable
* script.js Automatically create a problem record from incident volume Use case: Automatically create a problem record if a specific Configuration Item (CI) is associated with more than a certain number of incidents within a defined timeframe. Code snippet This code can be placed in a Scheduled Script Execution or an After Insert Business Rule to check new incidents * README.md * Script.js Identify the oldest active incident for each assignment group. This helps managers focus on long-running tickets that may require special attention. * README.md * script.js This example searches a JSON document for all developers listed under the specified path. * README.md * Update README.md * script.js Identify inactive users who still have unresolved incidents. This helps with offboarding processes and ensures incidents aren't left unattended. * README.md * Update script.js * Delete Core ServiceNow APIs/GlideAggregate/Count Inactive Users with Active incidents/README.md * Delete Core ServiceNow APIs/GlideAggregate/Count Inactive Users with Active incidents/script.js * Delete Core ServiceNow APIs/GlideAggregate/Find oldest Incident based Assignment Groups/README.md * Delete Core ServiceNow APIs/GlideAggregate/Find oldest Incident based Assignment Groups/script.js * Delete Core ServiceNow APIs/GlideJsonPath/GlideJsonPath Reader Example/README.md * Delete Core ServiceNow APIs/GlideJsonPath/GlideJsonPath Reader Example/script.js * script.js Count Inactive Users with Active incidents * README.md * Delete Client-Side Components/Client Scripts/Count Inactive Users with Active incidents/README.md * Delete Client-Side Components/Client Scripts/Count Inactive Users with Active incidents/script.js * README.md * script.js * README.md * Create script.js * Delete Server-Side Components/Server Side/Count Inactive Users with Active incidents directory * Delete Core ServiceNow APIs/GlideAggregate/Create Problem based on incident volume/README.md * Delete Core ServiceNow APIs/GlideAggregate/Create Problem based on incident volume/script.js
* Create Readme.md * Create script include.js * Create client script.js
* Create Readme.md * Create Client script.JS * Create Script include.js
* Create ReadMe.md * Create Code.js
* Create Readme.md * Create scheduled scriptinclude.JS * Create scheduled client script.js * Create scheduled_job.JS
* Create onChangeClientScript.js * Create ClientCallableScriptInclude.js * Updated onChangeClientScript.js removed location and added department field instead * Create README.md
* Create Readme.JS * Create submit validation client script.js * Create on submit scriptinclude.JS * Update submit validation client script * Rename Readme.JS to Readme.md * Rename submit validation client script to submit validation client script.js
* Script.js * README.md
* Create BeforeBRScript.js * Create README.md
* code_snippet.js * README.md * Add files via upload * code_snippet.js * README.md * README.md
* Create readme.md * Create test.js * Delete Client-Side Components/Client Scripts/Test directory * Create readme.md * Create Script.js * Update readme.md * Update Script.js * Update readme.md
* Create printer_friendly_verison.js * Create README.md
* Create README.md * Create script.js * Update script.js * Update README.md * rename the folder
…2641) * Create getMidServerAgentLog.js Code to get Mid server log file * Create README.md Readme docs about the script used to retrieve the agent log file on demand from the mid server
* Create change_soc.js * Create config.js * Create data.js * Create README.md
* Code for Moveworks bot messages for Flow to include url links * Delete Moveworks messages html for Flow * Create script.js * Create readme.md
* Create Readme.md * Create client script.JS * Create Script include.JS * Create widget client controller.JS * Create widget server script.JS
* Code for Moveworks bot messages for Flow to include url links * Delete Moveworks messages html for Flow * Create script.js * Create readme.md * Create script.js * Create readme.md * Delete Client-Side Components/Client Scripts/Auto Priority Update based on Impact and Urgency/readme.md * Delete Client-Side Components/Client Scripts/Auto Priority Update based on Impact and Urgency/script.js
* Code for Moveworks bot messages for Flow to include url links * Delete Moveworks messages html for Flow * Create script.js * Create readme.md * Create script.js * Create readme.md * Delete Client-Side Components/Client Scripts/Auto Priority Update based on Impact and Urgency/readme.md * Delete Client-Side Components/Client Scripts/Auto Priority Update based on Impact and Urgency/script.js
* Create script.js * Create readme.md
* Create script.js * Create read.md
* Add script to display user mentions in Service Portal This script retrieves and displays the top 5 records where the logged-in user is mentioned, providing links to those records. * Delete Modern Development/Service Portal Widgets/My Mentioned Items directory * Create script.js * Delete Modern Development/Service Portal Widgets/My Mentioned Items directory * Create script.js * Delete Server-Side Components/Scheduled Jobs/Retire Rating 1 Articles directory * Create script.js * Update script.js * Create README.md * Update README.md * Update script.js
* Create script.js * Create read.md
…2663) * Create script.js * Create read.md
* Create Readme.md * Create Script include.JS * Create client script.js
* Create getMidServerAgentLog.js Code to get Mid server log file * Create README.md Readme docs about the script used to retrieve the agent log file on demand from the mid server * Create tableGrowthAnalysis.js Script to assess the given table growth in the instance * Add README md file Instructions about the usage of the script provided for assessing the given table growth
* Create script.js * Create read.md
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Description:
Pull Request Checklist
Overview
Code Quality
Repository Structure Compliance
Core ServiceNow APIs/Server-Side Components/Client-Side Components/Modern Development/Integration/Specialized Areas/Documentation
Restrictions