ServiceNow

Modify Reference Qualifiers Using Catalog Client Script

Modify Reference Qualifiers Using Catalog Client Script Create onLoad/onChange catalog client script on the main catalog item. Use the below script, var filter = g_list.get(‘variable_name’); // Put your variable name filter.setQuery(‘active=true’);

Microsoft Azure AD – Graph API to ServiceNow Integration Using REST Message

Microsoft Azure AD – Graph API to ServiceNow Integration Using REST Message

Here we are going to Integrate Microsoft Azure AD users to ServiceNow using REST Message. Follow the below steps. Step 1: Application Registry Navigate to System OAuth -> Application Registry Click New and select Connect to a third party OAuth Provider Fill the field values as below, Name: Azure AD – API Graph Client ID:…

Service Catalogs

Introduction: Basically when there is an issue, user will raise an incident/problem request. But when a user wants to have access to a particular application, create new ids for them or request for a laptop then user have to use Service Catalogs. Here we will discuss about 3 users. End User will raise the request…

Very Simple Method to Show Incident List on Portal Page

Using Widget we are going to show the list of Incident’s on Portal Page. Follow the below simple steps to develop the logic. Steps: Step 1 – Create new Widget  Navigate to Service Portal> Widgets. Click New to create New Widgets. Name: Incident List ID: inc_list HTML:  <h2><center>INCIDENT LIST</center></h2> <table class=”table-task”> <thead> <tr> <th>No.</th> <th>Incident Number</th>…

UI Page to show list of Records based on selected users

Using UI Page we are going to show the list of Incident’s based on selected users as Caller. Follow the below simple steps to develop the logic. Steps: -> Navigate to System UI> UI Pages. -> Click New to create New UI Page. -> Name: IncidentListBySelectedUserFILTEROne -> Script: HTML <?xml version=”1.0″ encoding=”utf-8″ ?> <j:jelly trim=”false” xmlns:j=”jelly:core”…

ServiceNow – Generate Pivot Table from any table in UI Page

Here we are going to convert the Pivot table from the list of Incident list generated based on query present in Script Include. Follow the Steps to develop Pivot Table in UI Page: 1. Create Script Include to get the records -> Navigate to System Definitions > Script Includes. -> Click New to create New Script Include…

Servicenow – List of all operators

List of all operators: addQuery(‘priority’, ‘=’, 1); //= Field must be equal to value supplied. addQuery(‘priority’, ‘>’, 1); // > Field must be greater than value supplied addQuery(‘priority’, ‘<‘, 3); //< Field must be less than value supplied. addQuery(‘priority’, ‘>=’, 1); //>= Field must be equal or greater than value supplied addQuery(‘priority’, ‘<=’, 3); //<=…

ServiceNow – How to Query Table

How to Query Table? To query a table, first create a ServiceNow object for the table. This object is called a GlideRecord. To create a GlideRecord create the following script: var target_table = new GlideRecord(‘incident’); target_table.query(); // Issue the query to the database to get all records while(target_table.next()) { // add code here to process…

ServiceNow – Background Script to delete records

Background Script to delete records: Follow the steps to delete records using Nackground script. Navigate to System Defnition -> Scripts – Background Script:

ServiceNow – Remove Option from choice field using Client Script

OnLoad Hide Close Option from State field in Incident table Navigate to System Defnition -> Client Script. Click New. Table: Incident UI Type: All Type: OnLoad function onLoad() { //Type appropriate comment here, and begin script below g_form.removeOption(‘state’, ‘7’); } OnChange Hide Closed option when Contact type is email and when Contact type is phone…