Search Results
16 results found with an empty search
- Our Comprehensive Collection of ServiceNow LearningVideos
Unlock The Power of ServiceNow: How Instance Scan Can Help to optimize your instance In this video, I'm going to show you how to use ServiceNow's instance scan feature to optimize your instance. Instance scan is a powerful tool that can help you to diagnose and fix common issues on your ServiceNow instance. Instance Scan is a built-in feature in ServiceNow which is used to examine your instance for configurations that indicate health issues and identify opportunities to address best practices. It helps you to maintain a healthy and well-performing instance by analyzing configuration data and identifying potential issues. It checks your existing configurations and helps you avoid creating future configuration issues. It offers a set of predefined scans that cover various areas, such as performance, security, and upgradeability. Instance Scan is a tool that can be used as a part of your development operations, release management as well as pre- and post-upgrades. So whether you're looking to optimize your performance or troubleshoot an issue, ServiceNow's instance scan is a great way to get started. Watch this video to learn more about how to use instance scan to your advantage! Inbound Email to trigger Flow in ServiceNow| Flow Designer | No Code Inbound Action In this video, we're going to talk about setting up an inbound email to trigger a flow in ServiceNow." Inbound email triggers are incredibly useful in automating your processes. They can automatically create tickets, send notifications, or initiate workflows, based on the content of the email. So, let's dive right in! Unveiling The World Of Incident Table API: Learn How To Leverage ServiceNow Integration! Hello everyone, welcome to SAASWITHSERVICENOW, In this video you learn about incident table API. ServiceNow provides extensive access to instances through a set of RESTful APIs. The Table API provides endpoints that allow you to perform create, read, update, and delete (CRUD) operations on existing tables. You must come across a requirement where a 3rd party system wants to integrate with Incident data in ServiceNow. In this video, I will show you how you can use Table API for different types of use cases. Automation Testing | ServiceNow Portal Testing | Python and Selenium This videos shows how can you perform automation testing of ServiceNow Portal with Python and Selenium. The best open source tool for automation testing in the market is Selenium which is being used in almost all the organisations. Selenium can be used with different programming languages however we have used Python to demonstrate the automation of ServiceNow Portal. Python is also growing and demanding language in IT world. It is easy to learn. If you are new to automation testing and Python then this video will definitely help you to learn automation testing with Python. Automate Approval with Flow Designer | No Scripting Required This videos shows how create an approval flow for a Finance portal access in ServiceNow via catalog item. I have used ServiceNow Flow Designer rather than workflow. Use Case: If you customer or client is asking to automate an approval process which they are doing manually. Service Catalog Development | Create Catalog Item | Automate Approval Workflow This videos shows how create an approval workflow for a Finance portal access in ServiceNow via catalog item. Use Case: If you customer or client is asking to automate an approval process which they are doing manually. ServiceNow Developer Training ServiceNow Developer Training will help you become good ServiceNow Developer and upgrade your coding skill in ServiceNow. If you are a ServiceNow Administrator and you want to be become a ServiceNow Developer then this is right channel for you. Please keep watching my ServiceNow Developer Training series to become a great ServiceNow Developer. Preparation for Scripting Client Side Scripting Server Side Scripting Client Script API Used in Client Script | Glide Form In this video you will learn about API used in Client Script and about Glide Form Methods. API Used in Client Script | Glide Form API Used in Client Script | Glide Form API Used in Client Script | Glide Form API Used in Client Script | Glide Form API Used in Client Script | Glide Form API Used in Client Script | Glide Form API Used in Client Script | Glide Form API Used in Client Script | Glide Form API Used in Client Script | Glide Form API Used in Client Script | Glide Form API Used in Client Script | Glide Form API Used in Client Script | Glide Form ServiceNow Portal Training ServiceNow Portal Training will help you become good ServiceNow Portal Developer and upgrade your coding skill in ServiceNow Portal Development. If you are a ServiceNow Core Developer and you want to be become a ServiceNow Portal Developer then this is the right channel for you. Please keep watching my ServiceNow Portal Training series to become a great ServiceNow Portal Developer. Introduction Branding Editor Portal Configuration Portal Framework Portal Themes Portal Branding Editor Branding Editor Branding Editor Master ServiceNow Admin Tasks - Uncover the Secrets of the URL Navigation! How to navigate to a record via URL in ServiceNow. How to add contextual knowledge search in catalog item This video shows how to add contextual knowledge search in catalog item. What is Incident Resolution Process Flow | Incident Management | Learn Process in One Minute This videos shows the process flow of Incident and its resolution. This is diagrammatic view and just shows the process flow involved in Incident Management and Incident's resolution IT incident management is an area of IT service management (ITSM) wherein the IT team returns a service to normal as quickly as possible after a disruption, in a way that aims to create as little negative impact on the business as possible. An incident is an unexpected event that disrupts the normal operation of an IT service. A problem is an underlying issue that could lead to an incident. IT incident management helps keep an organization prepared for unexpected hardware, software and security failings, and it reduces the duration and severity of disruption from these events. It can follow an established ITSM framework, such as IT infrastructure library (ITIL) or COBIT, or be based on a combination of guidelines and best practices established over time. GlideAggregate in ServiceNow How to use GlideAggregate This videos shows examples of using GlideAggregate. You will learn how to use GlideAggregate to count the records which is th best practise to count the records in ServiceNow. ServiceNow Admin Certification Questions | Interview and Certification Preparation This video shows ServiceNow Admin questions which will help you to prepare admin interview and certification. If you have recently learned ServiceNow and preparing yourself for interview this video is best for you as you will learn what kind of questions are asked during interview and ServiceNow Admin Certification. Are you looking for ServiceNow jobs and have issues in getting selected. This video will help you to refresh your knowledge in ServiceNow. This will help you to clear the ServiceNow Admin Interview. These kind of questions are also asked in ServiceNow Admin Certification. ServiceNow Admin Certification Questions | Interview and Certification Preparation This video shows ServiceNow Admin questions which will help you to prepare admin interview and certification. If you have recently learned ServiceNow and preparing yourself for interview this video is best for you as you will learn what kind of questions are asked during interview and ServiceNow Admin Certification. Are you looking for ServiceNow jobs and have issues in getting selected. This video will help you to refresh your knowledge in ServiceNow. This will help you to clear the ServiceNow Admin Interview. These kind of questions are also asked in ServiceNow Admin Certification. Learn Glide Ajax ServiceNow | Example of Glide Ajax | Populate Assignment Group as per CI Selected This video shows an example of Glide Ajax by populating Assignment group as Configuration item selected on the incident form. The GlideAjax class allows the execution of server-side code from the client. GlideAjax calls pass parameters to the script includes, and, using naming conventions, allows the use of these parameters. How to create incident from another ServiceNow instance with rest This video shows the use of rest explorer and how can you create incident on another instance automatically with REST API. Representational State Transfer (REST) is a software architectural style that defines a set of constraints to be used for creating Web services. Web services that conform to the REST architectural style, called RESTful Web services (RWS), provide interoperability between computer systems on the Internet. RESTful Web services allow the requesting systems to access and manipulate textual representations of Web resources by using a uniform and predefined set of stateless operations. What is ServiceNow | ServiceNow Tutorial for Freshers and Beginners Do you know what is ServiceNow and why we use ServiceNow. This video is for ServiceNow beginners who wants to know what is ServiceNow and how can they make career in ServiceNow. You will learn: Who should do this training? What is ServiceNow What is SAAS? ServiceNow as a Product Products similar to ServiceNow Why ServiceNow? Career Path in ServiceNow Certifications in ServiceNow ServiceNow Website Sources of Learning ServiceNow How to access ServiceNow? Versions of ServiceNow How can I learn ServiceNow ServiceNow Developer Portal What is a Ticket? How to create incident in ServiceNow This video is very basic to show how to create incident in ServiceNow. ServiceNow Guide for Developers | How to configure LDAP Server This video shows how to integrate and configure LDAP server with ServiceNow. I have used free public test LDAP URL to show this demo. If you are looking for help to configure LDAP Server in your instance then this video will really be helpful. LDAP URL: http://www.forumsys.com/tutorials/integration-how-to/ldap/online-ldap-test-server/ ServiceNow System Administration Course Syllabus This video is about the syllabus of ServiceNow System Administration certification Examination. If you are a ServiceNow Administrator and looking for the certification then this will give you an idea of the syllabus. This Syllabus was posted 3 years ago and not related to new version. How to create ServiceNow free personal developer instance This video will help you to register for your personal developer instance of servicenow so that you can practice and learn. ServiceNow Provides free Developer instance and anyone who wants to learn ServiceNow can register to Developer website and get their own instance to practice ServiceNow Development and Administration. Unlock the Mystery of ServiceNow: Activate a Plugin in Minutes! This video shows how to activate a plugin in ServiceNow. ServiceNow has different plugins which are used to activate and install different features and applications in ServiceNow. Some plugins can be installed by Customer and some are are required to be enabled by ServiceNow. Unleashing the Power of Integration: Learn How to Insert Records in ServiceNow using REST! In this video, we'll be showing you how to use the REST API in ServiceNow to insert records from an external page. By the end of this video, you'll be able to insert records from an external page using the REST API in ServiceNow! This is a great technique for accessing data that's not available in the ServiceNow console or through the ServiceNow API. So make sure to watch this video and learn how to insert records in ServiceNow using the REST API! You should have basic understanding of HTML, Javascript, Ajax and API. This is an integration demo from external website to work on ServiceNow records. If you want to learn integration and connect ServiceNow from another application then this video will help you perform integration with ServiceNow. ServceNow Jakarta Features | Quick Showcase ServiceNow released a new version of ServiceNow called Jakarta. This video shows all top features came with this version. How to activate Knowledge Versioning in Jakarta ServiceNow introduced new fucntionality of Knowledge Versioning with Jakarta version. This video shows how to enable that functionality. ServiceNow Admin Certification Questions | Interview and Certification Preparation This video shows ServiceNow Admin questions which will help you to prepare admin interview and certification. If you have recently learned ServiceNow and preparing yourself for interview this video is best for you as you will learn what kind of questions are asked during interview and ServiceNow Admin Certification. Are you looking for ServiceNow jobs and have issues in getting selected. This video will help you to refresh your knowledge in ServiceNow. This will help you to clear the ServiceNow Admin Interview. These kind of questions are also asked in ServiceNow Admin Certification.
- 5 Must-Know ServiceNow Best Practices for Developers
ServiceNow developers are constantly looking for ways to enhance their productivity, efficiency, and effectiveness. Here are five essential best practices that every ServiceNow developer should know to streamline their workflows and achieve more reliable, scalable solutions. 1. Leverage Script Includes for Re-usability Script Includes are a powerful way to maintain code re-usability and modularity in ServiceNow. Instead of writing repetitive scripts, encapsulate common functionalities within script includes. This approach promotes code reuse, easier maintenance, and significantly reduces the risk of bugs. Example: var IncidentUtils = Class.create(); IncidentUtils.prototype = { initialize: function() {}, closeIncident: function(incidentId, closeNotes) { var gr = new GlideRecord('incident'); if (gr.get(incidentId)) { gr.state = 7; // Closed gr.close_notes = closeNotes; gr.update(); } }, type: 'IncidentUtils' }; 2. Optimize Performance with GlideQuery GlideQuery simplifies database queries and enhances performance. Unlike traditional GlideRecord queries, GlideQuery allows chaining methods to create concise and readable queries. Example: var incidents = new global.GlideQuery('incident') .where('priority', '>=', 2) .select('number', 'short_description') .limit(10) .toArray(10); incidents.forEach(function(incident) { gs.info(incident.number + ': ' + incident.short_description); }); 3. Implement Robust Error Handling Always ensure that your code gracefully handles errors to prevent unexpected system failures. Using structured error handling like try-catch blocks and logging error details can save hours during debugging. Example: try { var gr = new GlideRecord('incident'); gr.addQuery('priority', 1); gr.query(); while (gr.next()) { // Processing } } catch (e) { gs.error('Error encountered: ' + e.message); } 4. Automate Testing with Automated Test Framework (ATF) ServiceNow's Automated Test Framework ensures reliability and consistency in your deployments. Creating automated tests for critical business scenarios ensures continuous quality assurance, reducing manual testing efforts significantly. Key benefits: Detect issues early Ensure consistent behavior post-updates Automate repetitive testing tasks 5. Leverage Flow Designer for Workflow Automation Flow Designer provides a low-code approach to automate workflows efficiently. It helps developers create maintainable and clear business logic visually. Benefits include: Simplified and intuitive workflow creation Reduced coding complexity Faster deployment and changes
- ServiceNow System Administration Questions
Q1: Which module in Service Catalog application is used to create catalog item? A . Maintain Categories B . Maintain Items C . Content Items D . Items Correct Answer is Maintain Items(B) Q2: Which of the following would not appear in History section of application navigator? A . Records B . Pages C . Lists D . Forms Correct Answer is UI Pages(B) Q3: Which term refers to application menus and modules which you may want to access quickly and often? A . Breadcrumb B . Favorite C. Tag D . Bookmark Correct Answer is Favorite(B) Q4: Which term best describes something that is created, has worked performed upon it, and is eventually moved to a state of closed? A . report B . workflow C . event D . task Correct Answer is Task(D) Q5: Which of the following are a type of clients script supported in service now?(choose four) A . onSubmit B . onUpdate C . onCellEdit D . onLoad E . onEdit F . onChange G . onSave Correct Answer is A C D F Q6: What is a formatter? Select one of the following. A . A formatter allows you to configure applications on your instance B . A formatter is a form element used to display information that is not a field in the record C . A formatter allows you to populate fields automatically D . A formatter is a set of conditions applied to a table to help find and work with data Correct Answer is A formatter is a form element used to display information that is not a field in the record(B) Q7: Which one of the following statements describes the contents of the Configuration Management Database (CMDB)? A . The CMDB contains data about tangible and intangible business assets B . The CMDB contains the Business Rules that direct the intangible, configurable assets used by a company C . The CMDB archives all Service Management PaaS equipment metadata and usage statistics D . The CMDB contains ITIL process data pertaining to configuration items Correct Answer is The CMDB contains data about tangible and intangible business assets(A) Q8: Which one of the following statements describes the purpose of a Service Catalog workflow? A . A Service Catalog workflow generates three basic components: item variable types, tasks, and approvals B . Although a Service Catalog workflow cannot send notifications, the workflow drives complex fulfillment processes C . A Service Catalog workflow is used to drive complex fulfillment processes and sends notifications to defined users or groups D . A Service Catalog workflow generates three basic components: item variable types, tasks, and notifications Correct Answer is A Service Catalog workflow is used to drive complex fulfillment processes and sends notifications to defined users or groups(C) Q9: Which of the following statement describes the purpose of an Order Guide? A . Order Guides restrict the number of items in an order to only one item per request B . Order Guide provide a list of guidelines for Administrators on how to set up item variables C . Order Guide provide the ability to order multiple, related items as one request D . Order Guides take the user directly to the checkout without prompting for information Correct Answer is Order Guide provide the ability to order multiple, related items as one request(C) Q10: Which type of interface enables you to display multiple performance analytics, reporting and other widgets on a single screen? A . Form B . List C . Dashboard D . Timeline Correct Answer is Dashboard(C) Q11: What is a Dictionary Override? A . A Dictionary Override is an incoming customer update in an Update Set which applies to the same objects as a newer local customer update IT Certification Guaranteed, The Easy Way! 3 B . A Dictionary Override is the addition, modification, or removal of anything that could have an effect on IT services C . A Dictionary Override is a task within a workflow that requests an action before the workflow can continue D . A Dictionary Override sets field properties in extended tables Correct Answer is A Dictionary Override sets field properties in extended tables(D) Q12: Record numbers have to be manually incremented A . True B . False Correct Answer is False(B) Q13: ServiceNow is a single-instance, multiple tenant architecture? A. True B. False Correct Answer is False(B) Q14: Which of the following concepts are associated with the ServiceNow CMDB? (Choose four) A . Service Processes B . User Permissions C . Tables and Fields D . A Database E . The Dependency View Correct Answer is A C D E Q15: UI Policy can make fields read-only, mandatory, or hidden. A . True B . False Correct Answer is True(A) Q16: What are the two aspects to LDAP Integration? A . Data Population B . Data formatting C . Authorization D . Authentication Correct Answer is A D Q17: Buttons, form links, and context menu items are all examples of what type of functionality? A . Business Rule B . UI Action C . Client Script D . UI Policy Correct Answer is UI Action(B) Q18: Which one of the following statements is a recommendation from ServiceNow about Update Sets? A . Avoid using the Default Update set as an Update Set for moving customizations from instance to instance B . Before moving customizations from instance to instance with Update Sets, ensure that both instances are different versions C . Use the Baseline Update Set to store the contents of items after they are changed the first time D . Once an Update Set is closed as "Complete", change it back to "In Progress" until it is applied to another instance Answer: A Correct Answer is Avoid using the Default Update set as an Update Set for moving customizations from instance to instance(A) Q19: What are the four knowledge workflows available in the ServiceNow base instance? A . Approval publish: Request approval from a manager of the knowledge base before moving the article it the publish state B . Instant Publish: Immediately publishes a draft article without requiring an approval C . Instant Retire: Immediately retires a published article without requiring an approval D . Retire Knowledge: Moves a knowledge article to the retired state. Correct Answer is Approval publish: Request approval from a manager of the knowledge base before moving the article it the publish state(A) Q20 : Which three Variable Types can be added to a Service Catalog Item? A . True/False, Multiple Choice, and Ordered B . True/False, Checkbox, and Number List C . Number List, Single Line Text, and Reference D . Multiple Choice, Select Box, and Checkbox Correct Answer is Multiple Choice, Select Box, and Checkbox(D) Q21: How is the Event Log different from the Event Registry? A . Event Log contains generated Events, the Event Registry is a table of Event definitions B . Event Log is formatted in the Log style, the Event Registry displays different fields C . Event Log lists Events that were triggered by integrations, the Event Registry lists the Events that were triggered during the day (24-hour period) D . Event Log is the same as the Event Registry Correct Answer is Event Log contains generated Events, the Event Registry is a table of Event definitions(A) Q23: There are _____ common types of Interfaces (Numeric Value) 6: There are six common types of interfaces A . Homepage: Consists of navigational elements, functional controls, and platform information. B . List: Display records from a data table, as well as allow you to edit the record information using the List Editor functionally. C . Form: Data is entered into ServiceNow through forms D . Dashboard: Enable you to display multiple performance analytics, reporting and other widgets on a single screen. E . Maps: Display ServiceNow data graphically on a Google map F. Timelines: Used to track tasks or projects Correct Answer is Form: Data is entered into ServiceNow through forms(C) Q24: What is the purpose of a Related List? A . To create a one-to-many relationship B . To dot-walk to a core table C . To present related fields D . To present related records Correct Answer is To present related records(D) Q25: For Administrators creating new Service Catalog items, what is a characteristic they should know about Service Catalog variables? A . Service Catalog variables can only be used in Record Producers B . Service Catalog variables can only be used in Order Guides C . Service Catalog variables cannot affect the order price D . Service Catalog variables are global by default Correct Answer is Service Catalog variables are global by default(D) Q26: Which are valid Service Now User Authentication Methods? (Choose three.) A . XML feed B . Local database C . LDAP D . SSO E . FTP authentication Correct Answer is B C D Q27: Which tool is used to have conversations with logged-in users in real-time? A . Connect Chat B . Now Messenger C . User Presence D . Comments Correct Answer is Connect Chat(A) Q28: Which of the following allows a user to edit field values in a list without opening the form? A . Data B . Edit Menu C . List Editor D . Form Designer Correct Answer is List Editor(c) Q29: In what order should filter elements be specified? A . Field, Operator, then Value B . Field, Operator, then Condition C . Operator, Condition, then Value D . Value, Operator, then Field Correct Answer is Field, Operator, then Value(A) Q30: What is a Record Producer? A . A Record Producer is a type of Catalog Item that is used for Requests, not Services B . A Record Producer creates user records C . A Record Producer is a type of Catalog Item that provides easy ordering by bundling requests D . A Record Producer is a type of a Catalog Item that allows users to create task-based from the Service Catalog Correct Answer is A Record Producer is a type of a Catalog Item that allows users to create task-based from the Service Catalog(D) Q31 : Which one of the following statements is true about Column Context Menus? A . It displays actions such as creating quick reports, configuring the list, and exporting data B . It displays actions related to filtering options, assigning tags, and search C . It displays actions related to viewing and filtering the entire list D . It displays actions such as view form, view related task, and add relationship Correct Answer is It displays actions such as creating quick reports, configuring the list, and exporting data(A) Q32: Which of the following is true of Service Catalog Items in relation to the Service Catalog? A . They run behind the scenes B . They are the building blocks C . They are optional D . They provide options Correct Answer is They are the building blocks(B) Q33: What are the main UI component(s) of the ServiceNow Platform? A . Banner Navigator B . Banner Frame C . Application Frame D . Application Navigator E . Content Menu F . Content Frame Correct Answer is B D F Q34: The baseline Service Catalog homepage contains links to which of the following components? A . Record Producers, Order Guides, and Catalog Items B . Order Guides, Item Variables, and Workflows C . Order Guides, Catalog Items, and Workflows D . Record Producers, Order Guides, and Item Variables Correct Answer is Record Producers, Order Guides, and Catalog Items(A) Q35: Access Control rules may be defined with which of the following permission requirements? (Choose three.) A . Roles B . Conditional Expressions C . Assignment Rules D . Scripts E . User Criteria F. Groups Correct Answer is A B D Q36: Which are states that you can make a field on a form using UI Policy? A . read-only B . write-only C . Necessary D . Mandatory E . Empty F . Hidden Correct Answer is A D F Q37: Which of the following can be customized through the Basic Configuration UI 16 module? (Choose three.) A . Banner Image B . Record Number Format C . Browser Tab Title D . System Date Format E. Form Header Size Correct Answer is A C D Q38: database live at the Data Center. A . True B . False Correct Answer is ( A) Q40: Which one of the following statements applies to a set of fields when they are coalesced during an import? A . If a match is found using the coalesce fields, the existing record is updated with the information being imported B . If a match is not found using the coalesce fields, the system does not create a Transform Map C . If a match is found using the coalesce fields, the system creates a new record D . If a match is not found using the coalesce fields, the existing record is updated with the information being imported Correct Answer is If a match is found using the coalesce fields, the existing record is updated with the information being imported(A) Q41: What information does the System Dictionary contain? A . The human-readable labels and language settings B . The definition for each table and column C . The information on how tables relate to each other D . The language dictionary used for spell checking Correct Answer is The definition for each table and column(B) Q42: What is the Import Set Table? A . A table where data will be placed, post-transformation B . A table that determines relationships C . A staging area for imported records D . A repository for Update Set information Correct Answer is A staging area for imported records(C) Q43: What is the name of the conversational bot platform that provides assistance to help users obtain information, make decisions, and perform common tasks? A . Answer Agent B . live Feed C . Virtual Agent D . Connect Chat Correct Answer is Virtual Agent(C) Q44: Reports can be created from which different places in the platform? (Choose two.) A . List column heading B . Metrics module C . Statistics module D . View / Run module Correct Answer is A D Q45: Which one of the following statements best describes the purpose of an Update Set? A . An Update Set allows administrators to group a series of changes into a named set and then move this set as a unit to other systems B . By default, an Update Set includes customizations, Business Rules, and homepages C . An Update Set is a group of customizations that is moved from Production to Development D . By default, the changes included in an Update Set are visible only in the instance to which they are applied Correct Answer is An Update Set allows administrators to group a series of changes into a named set and then move this set as a unit to other systems(A) Q46: When using the Load Data and Transform Map process, what is the Mapping Assist used for? A . Mapping fields using the Import Log B . Mapping fields using Transform History C . Mapping fields using an SLA D . Mapping fields using a Field Map Correct Answer is Mapping fields using a Field Map(D) Q48: A group is stored in which table? A . Group[user group] B . Group[sys_user] C . Group[sys_user_group] D . Group[sys_user_group_profile] Correct Answer is Group[sys_user_group](C) Q49: When working on a form, what is the difference between Insert and Update operations? A . Insert creates a new record and Update saves changes, both remain on the form B . Insert creates a new record and Update saves changes, both exit the form C . Insert saves changes and exits the form, Update saves changes and remains on the form D . Insert saves changes and remains on the form, Update saves changes and exits the form Correct Answer is Insert saves changes and remains on the form, Update saves changes and exits the form(D) Q50: What is the purpose of flagging an article in a knowledge base? A . To mark an article to read later B . Allow a user to submit feedback about an article C . Reporting an error Correct Answer is Allow a user to submit feedback about an article(B) Q51: What is the master table that contains a record for each table in the database? A . [sys_master_db] B . [sys_db_object] C . [sys_master_object] D . [sys_object_db] Correct Answer is [sys_db_object](B) Q52: Which technique is used to get information from a series of referenced fields from different tables? A. Table-Walking B. Sys_ID Pulling C. Dot-Walking D. Record-Hopping Correct Answer is Dot-Walking(C) Q53: Which one of these applications is available to all users? A . Change B . Incident C . Facilities D . Self-Service Correct Answer is Self-Service (D) Q54: Tables are made up of which of the following? A . records B . lists C . forms. D . fields Correct Answer is A D Q55: A knowledge article must be which of the following states to display to a user? A. Published B. Drafted C. Retired D. Reviewed Correct Answer is Published(A) Q56: What are the 6 methods available for user authentication? A . Local Database: The user name and password in their user record in the instance database. B . Multifactor: The user name and password in the database and passcode sent to the user's mobile device that has Google Authenticator installed C . LDAP: The user name and password are accessed via LDAP in the corporate directory, which has a matching user account in the database. D . SAML 2.0: The user name and password configured in a SAML identity provider account, which has a matching user account in the database. E . OAuth 2.0: The user name and password of OAuth identity provider, which has a matching user account in the database. F . Digest Token: An encrypted digest of the user name and password in the user record Correct Answer is A B C D E F Q57: Knowledge articles within a knowledge base are grouped by category. A. True B. False Correct Answer is True(A) Q58: A REQ number in the Service Catalog represents... A . the order number. B . the stage. C . the task to complete. D . the individual item in the order. Correct Answer is the order number(A) Q59: As it relates to ServiceNow reporting, which of the following statements describes what a metric can do? A . A metric is a report gauge used on homepages to display real-time data B . A metric is a time measurement used to report the effectiveness of workflows and SLAs C . A metric is used to measure and evaluate the effectiveness of IT service management processes D . A metric is a comparative measurement used to report the effectiveness of workflows and SLAs Correct Answer is A metric is used to measure and evaluate the effectiveness of IT service management processes(C) Q60: Knowledge Base Search results can be sorted by which of the following? (Choose three.) A . Most recent update B . Popularity C . Relevancy D . Manager assignment E . Number of views Correct Answer is A C E Q61: Which of the following statements is true when a new table is created by extending another table? A . The new table archives the parent table and assumed its roles in the database B . The new table inherits all of the Business Rules, Client Scripts, and UI Policies of the parent table, but none of the existing fields C . The new table inherits all of the fields of the parent table and can also contain new fields unique to itself D . The new table inherits all of the fields, but does not inherit Access Control rules, Client Scripts, and UI Policies of the parent table Correct Answer is The new table inherits all of the fields of the parent table and can also contain new fields unique to itself(C) Q62: What is the path an Administrator could take to view the fulfilment stage task list for an order placed by a user? A . RITM (Number)>REQ (Number)>PROCUREMENT (Number) B . REQ (Number)>RITM (Number)>PROCUREMENT (Number) C . REQ (Number)>RITM (Number)>TASK (Number) D . FULFILLMENT (Number)>RITM (Number)>TASK (Number) Correct Answer is REQ(Number)>RITM (Number)>TASK(Number)(C) Q63: What refers to an application or system that accesses a remote service or another computer system, known as a server? A . Server B . Client C . Script D . Policies Correct Answer is Client(B) Q64: Which one statement correctly describes Access Control rule evaluation? A . Rules are evaluated using roles. The role with the most permissions evaluates the rules first B . If more than one rule applies to a row, the older rule is evaluated first C . If a row level rule and a field level rule exist, both rules must be true before an operation is allowed D . Rules are evaluated from the general to the specific, so a table rule must be active to continue Correct Answer is If a row level rule and a field level rule exist, both rules must be true before an operation is allowed(C) Q65: When searching using the App Navigator search field, what can be returned? (Choose four.) A . Names of Applications and Modules B . Names of Modules C . Names of Applications D . Favorites E . History Records F . Titles of Dashboard Gauges Correct Answer is A B C D Q66: How are Workflows moved between instances? A . Workflows are moved using Update Sets B . Workflows are moved using Transform Maps C . Workflows are moved using Application Sets D . Workflows cannot be moved between instances Correct Answer is Workflows are moved using Update Sets(A) Q67: A Service Catalog may include which of the following components? A . Order Guides, Exchange Rates, Calendars B . Order Guides, Catalog Items, and Interceptors C . Catalog Items, Asset Contracts, Task Surveys D . Record Producers, Order Guides, and Catalog Items Correct Answer is Record Producers, Order Guides, and Catalog Items(D) Q68: Which application is used to change the number format per table? A . Number Maintenance B . System Maintenance C . Table Maintenance D . Record Maintenance Correct Answer is Number Maintenance(A) Q69: What is a way that you can mark a knowledge article for review? A . Flag article B . Review C . Bookmark D . On Hold Correct Answer is Flag article(A) Q70: What are the 5 provided Roles by ServiceNow? A . System Administrator: The admin role provides access to all platform features, applications, functions and data. B . Specialized Administrator: Specialized administrator roles manage specific functions or applications, such as Assignment Rules, Knowledge base, reports, or web services C . Fulfiller: Users with the ITIL role may fulfill ITIL activities associated with the ITIL workflow, including Incident and Change management. D . Approver: Users with the Approver user role can perform all requester actions and may view or modify approval records directed to the approver E . Requester: Also known as Employee Self Service (ESS) users, these users have no roles but can submit and manage their own requests, access public pages, etc. Correct Answer is A B C D E Q71: UI Action can prompt that an Incident has been successfully submitted. A . True B . False Correct Answer is True(A) Q72: What defines conditions that are evaluated against users to determine which users can create, read, write, and retire knowledge articles. A . User conditions B . User info C . User Criteria D . User permissions Correct Answer is User Criteria(C) Q73: What is a schema map? A . A schema map enables administrators to define records from specific tables as trouble sources for Configuration Items B . A schema map graphically organizes the visual task boards for the CMDB C . A schema map graphically displays the Configuration Items that support a business service D . A schema map displays the details of tables and their relationships in a visual manner, allowing administrators to view and easily access different parts of the database schema Correct Answer is A schema map displays the details of tables and their relationships in a visual manner,allowing administrators to view and easily access different parts of the database schema(D) Q74: What is the function of user impersonation? A . Testing and visibility B . Activate verbose logging C . View custom perspectives D . Unlock Application master list Correct Answer is Testing and visibility(A) Q75: What is the platform name for the User table? A . u_users B . sys_users C . x_users D . sys_user Correct Answer is sys_user(D) Q76: A User is stored in which table? A . User [sys_user] B . User [ sys_user_group] C . User [ syst_user_profile] D . User [user_profile] Correct Answer is User[sys_user](A) Q77: What is the difference between UI Policy and UI Action? A . UI Action can make fields read-only, mandatory, or hidden. while UI Policy can make a save button visible for appropriate users. B . UI Policy can make fields read-only, mandatory, or hidden. while UI Action can make a save button visible for appropriate users. Correct Answer is UI Policy can make fields read-only, mandatory, or hidden. while UI Action can make a save button visible for appropriate users(B) Q78: Where can Admins check which release is running on an ServiceNow instance? A . Memory Stats module B . Stats module C . System.upgraded table D . Transactions log Correct Answer is Stats module(B) Q79: Which group of permissions is used to control Application and Module access? A . Access Control Rules B . UI Policies C . Roles D . Assignment Rules Correct Answer is Roles(C) Q80: What is generated from the Service Catalog once a user places an order for an item or service? A . A change request B . An Order Guide C . A request D . An SLA Correct Answer is A request(C) Q81: Which type of tables may be extended by other tables, but do not extend another table? A . Base Tables B . Core Tables C . Extended Tables D . Custom Tables Correct Answer is Base Tables(A) Q82: ServiceNow uses what term to describe all the data saved within a particular form? A . Fields B . Form C . Record D . Lists Correct Answer is Record(C) Q83: Where would you go in ServiceNow to order services and products offered by various departments? A . Service Catalog B . Self Service C . Service Department D . Customer Service Correct Answer is Service Catalog(A) Q84: Table Access Control rules are processed in the following order: A. any table name (wildcard), parent table name, table name B. table name, parent table name, any table name (wildcard) C. parent table name, table name, any table name (wildcard) D. any table name (wildcard), table name, parent table name Correct Answer is table name, parent table name, any table name (wildcard)(B) Q85: Configuration will not affect what others see on their forms. A . True B . False Correct Answer is False(B) Q86: Data Policy can enforce mandatory data on import. A . True B . False Correct Answer is True(A) Q87: What displays a set of records from a table? A . View B. Dashboard C. Panel D. List Correct Answer is List(D) Q88: A role is recorded in which table? A . Role[sys_user] B . Role[sys_user_profile] C . Role[sys_user_record] D . Role[sys_user_role] Correct Answer is Role[sys_user_role](D) Q89: Which of the following is used to initiate a flow? A . A Trigger B . Core Action C . A spoke D . An Even Correct Answer is A Trigger(A) Q90: What are the two pathways to view feedback left on a published article? A. Knowledge > articles > My Flagged B. Knowledge base > my knowledge > flagged articles C. Knowledge > My articles > Flagged D. Knowledge > articles > published Correct Answer is A D Q91: Create Incident, Password Reset, and Report outage: what do these services in the Service Catalog have in common? A . They direct the user to a record producer B . They direct the user to a catalog property C . They direct the user to a catalog UI policy D . They direct the user to a catalog client script Correct Answer is They direct the user to a record producer(A) Q92: From the User menu, which actions can a user select? (Choose three.) A . Send Notifications B . Log Out ServiceNow C . Elevate Roles D . Impersonate Users E . Order from Service Catalog F . Approve Records Correct Answer is B C D Q93: Business Rules are used to enforce mandatory data on a form. A . True B . False Correct Answer is False(B) Q94: What is a characteristic of importing data into ServiceNow? A . An existing Transform Map can be used one time on the same import set B . Coalesce fields are used only after running Transform C . Any user can manage and set up import sets D . An existing Transform Map can be used multiple times on the same import set Correct Answer is An existing Transform Map can be used multiple times on the same import set(D) Q95: Each knowledge bases can have unique lifecycle workflows, user criteria, category structures, and management assignments. A . True B . False Correct Answer is True(A) Q96: Which statement is true about business rules? A . A business rule must run before a database action occurs B . A business rule can be a piece of Javascript C . A business rule must not run before a database action occurs D . A business rule monitors fields on a form Correct Answer is A business rule can be a piece of Javascript(B)
- What is GlideRecord in ServiceNow?
GlideRecord is a class in ServiceNow and it is used to perform database operations without writing SQL queries. You can use GlideRecord in ServiceNow to manipulate records in tables. GlideRecord is a powerful API that allows you to perform CRUD (Create, Read, Update, and Delete) operations on ServiceNow tables. You can use GlideRecord to query, insert, update, and delete records in any ServiceNow table. Here are some common use cases where GlideRecord can be used: Querying Records: You can use GlideRecord to query records from a table based on certain conditions. Updating Records: You can use GlideRecord to update the field values of a record in a table. Creating Records: You can use GlideRecord to create a new record in a table. Deleting Records: You can use GlideRecord to delete a record from a table. Here's a basic example of a GlideRecord script. var incidentGR = new GlideRecord('incident'); incidentGR.addQuery('priority', 1); incidentGR.orderBy('number'); incidentGR.query(); while (incidentGR.next()) { gs.info(incidentGR.number + ' ' + incidentGR.short_description); } Let me explain you each line of this code: 1. var incidentGR = new GlideRecord('incident'); This line is initializing a new GlideRecord object for the 'incident' table. 'incidentGR' is just a variable name - you could name this variable whatever you like. 'incident' is the name of the table in the ServiceNow database that you want to query. 2. incidentGR.addQuery('priority', 1); This line is adding a query to the GlideRecord object. The 'addQuery' method is used to add a filter to the query. In this case, it's filtering for records where the 'priority' field is 1. This is equivalent to the SQL WHERE clause. 3. incidentGR.orderBy('number'); This line is ordering the results of the query by the 'number' field. This is equivalent to the SQL ORDER BY clause. 4. incidentGR.query(); This line is executing the query. Up until this point, we've only been setting up the query. This line actually sends the query to the database and retrieves the results. 5. while (incidentGR.next()) This line is starting a while loop that will iterate over each record returned by the query. The 'next()' method moves to the next record in the result set. 6. { This is opening of while loop. 7. gs.info(incidentGR.number + ' ' + incidentGR.short_description); This line is logging the 'number' and 'short_description' fields of the current record. 'gs.info' is a method used to write to the ServiceNow system log. 8. } This line is closing the while loop. Remember, to use GlideRecord, you must have the appropriate database access permissions in your ServiceNow instance. Also, be careful not to inadvertently modify or delete data when using GlideRecord, especially in a production environment. You can use GlideRecord in various types of scripts in ServiceNow. Here are some examples: Business Rules: You can use GlideRecord in business rules to perform actions on records before or after they are saved to the database. Client Scripts: You can use GlideRecord in client scripts to manipulate data on the client side, such as setting field values or validating user input. (Read Note Below about using GlideRecord in Client Script) Script Includes: You can use GlideRecord in script includes to create reusable code that can be called from multiple scripts. Scheduled Jobs: You can use GlideRecord in scheduled jobs to perform batch operations on records, such as updating or deleting multiple records at once. UI Policies: You can use GlideRecord in UI policies to control the behavior of fields on a form, such as hiding or disabling fields based on certain conditions. Scripted REST APIs: You can use GlideRecord in scripted REST APIs to expose ServiceNow data to external systems. Overall, GlideRecord can be used in any script where you need to interact with ServiceNow records, whether it's on the server side or the client side. Using GlideRecord in Client Script While GlideRecord can be used in client scripts to manipulate data on the client side, it is generally not recommended to use it in client-side scripts due to performance and security concerns. Client scripts are executed on the user's browser, so using GlideRecord in a client script can cause additional load on the server and increase the time it takes for the script to execute. Additionally, because client scripts run on the user's browser, it is possible for malicious users to modify the script to perform unauthorized actions, such as deleting or modifying records they should not have access to. Instead of using GlideRecord in client scripts, it is recommended to use client-side APIs provided by ServiceNow, such as the GlideForm API or GlideAjax. These APIs are optimized for client-side performance and have built-in security features to prevent unauthorized actions. If you need to perform complex operations that require server-side processing, you can use AJAX calls to invoke server-side scripts and retrieve the results on the client side. This approach allows you to perform server-side processing while minimizing the impact on the client-side performance and security. GlideRecord API with practical examples Example Query incidents where Short Description and Description contains 'Infrastructure' keyword. var gr = new GlideRecord('incident'); gr.addQuery('short_description', 'CONTAINS', 'Infrastructure'); gr.addQuery('description', 'CONTAINS', 'Infrastructure'); gr.query(); while (gr.next()) { gs.print(gr.number + ': ' + gr.short_description); } Example Query incidents where State is Resolved and number of records returned should be 10. var gr = new GlideRecord('incident'); gr.addQuery('state', 'Resolved'); gr.setLimit(10); gr.query(); while (gr.next()) { gs.print(gr.number + ': ' + gr.short_description); } Example Here's an example of how you can update incidents with a priority of 1 while excluding system fields from the update operation using autoSysFields(false) in the GlideRecord API. var gr = new GlideRecord('incident'); gr.addQuery('priority', '1'); gr.query(); gr.autoSysFields(false); // Exclude system fields from the update operation while (gr.next()) { gr.setValue('short_description', 'Updated Short Description'); gr.setValue('description', 'Updated Description'); gr.update(); }
- A step-by-step guide on how to copy attachments from one task to another in ServiceNow.
Hello ServiceNow Professionals and Learners, As a ServiceNow developer or administrator, you've likely encountered situations where you needed to copy attachments from one task to another. This endeavour can be essential for streamlining processes and ensuring data consistency. Today, I'll walk you through a simple script that will accomplish this. Why Should You Copy Attachments? Before getting into the specifics, let's grasp the significance of this. In ServiceNow, the Request Item (RITM) is the parent record, and the SC Task is its child. Often, users attach documents to the RITM, thinking it will be visible to all related tasks. However, by default, attachments don't get copied or accessible to the SC Tasks. This can lead to missed information and increased back-and-forth communication. Automating this process can save time and reduce errors. To achieve this, we'll create a Business Rule that triggers when an attachment is added to an RITM. This rule will then copy the attachment to all associated SC Tasks. (function executeRule(current, previous /*null when async*/ ) { // Add your code here if (current.hasAttachments()) { var gr = new GlideRecord ( 'sc_task' ); gr.addQuery( 'request_item' ,current.sys_id); gr.query(); while (gr.next()) { var a = new GlideSysAttachment (); a.copy( 'sc_req_item' ,current.sys_id, 'sc_task' ,gr.sys_id); } } })(current, previous); Let's break down the code step by step: Check for Attachments if (current.hasAttachments()) This line checks if the current record (`current`) has any attachments. The `hasAttachments()` method is a built-in ServiceNow method that returns `true` if the record has one or more attachments, and `false` otherwise. Querying the 'sc_task' Table var gr = new GlideRecord('sc_task'); gr.addQuery('request_item',current.sys_id); gr.query(); Here, a new GlideRecord object is instantiated for the 'sc_task' table. GlideRecord is a ServiceNow API for database operations. The script then adds a query to filter records in the 'sc_task' table where the 'request_item' field matches the `sys_id` of the current record. The `gr.query()` method executes the query. Copying Attachments while (gr.next()) { var a = new GlideSysAttachment(); a.copy('sc_req_item',current.sys_id,'sc_task',gr.sys_id); } For each record in the 'sc_task' table that matches the query, the script creates a new `GlideSysAttachment` object (which is a ServiceNow API for managing attachments). The `a.copy()` method is then used to copy attachments from the current record in the 'sc_req_item' table to the matching record in the 'sc_task' table. With this functionality in place, every time a user attaches a document to an RITM, it will automatically be copied to all associated SC Tasks. This ensures that all necessary information is readily available, streamlining the process for ServiceNow Users.
- Integrating with ServiceNow via OAuth: A Step-by-Step Guide
In this digital era, ServiceNow is a widely used platform and integrating organisation's application with a powerful platforms like ServiceNow is a basic need to streamlines service delivery through effective automation and integration. One common way to achieve integration is using OAuth 2.0. OAuth (Open Authorization) is a secure protocol used extensively for authorizing API requests between applications. This blog walks you through integrating your application with ServiceNow using OAuth, specifically focusing on the Client Credentials Grant for machine-to-machine communication. In this case ServiceNow becomes OAuth provider, which means it will provides OAuth details to connect. So,the first step to integrate your application with ServiceNow using OAuth is to register your application within your ServiceNow instance.This allows ServiceNow to recognize your application and authorize data exchange. Note: The example shown in this blog is tested with POSTMAN application. You can apply the same concept in your application programming from where you want to connect with ServiceNow. Step 1: Register Your Application in ServiceNow Log into your ServiceNow instance. Navigate to the 'System OAuth' > 'Application Registry'. Click 'New' to create a new application registry. Select 'Create an OAuth API endpoint for external clients'. You will need to fill in some required fields: Field Field Information Name Provide a name for your application. Client ID This will be auto-generated by ServiceNow, but you can overwrite it if needed. Client Secret Similarly, this will be auto-generated but can be overwritten. Redirect URL The URL where users will be redirected after authorization.(Optional) Make sure you record the 'Client ID' and 'Client Secret', as you will need them later. Step 2: Implement OAuth Client Credentials Grant configuration in Your Application In this step, you'll implement the OAuth 2.0 Client Credentials Grant within your application. We will show you this in POSTMAN. Make a POST request to ServiceNow's OAuth token endpoint URL: https://.service-now.com/oauth_token.do Add following information in Body Format of Request Body should be x-www-form-urlencoded Key Value grant_type password client_id Client ID copied from Oauth details from ServiceNow client_secret Client Secret copied from Oauth details from ServiceNow redirect_uri https://.service-now.com/ username Any user of ServiceNow Instance password Password of same user Step 3: Use the Access Token to Make Authorized Requests In this step, you'll make request to ServiceNow with acccess token you recieved in preivous step.We will show you this in POSTMAN. Create Incident Make a POST request to Incident table API URL (The URL can change as per your business requirement.) URL: https://.service-now.com/api/now/table/incident Add headers Key Value Authorization Bearer Provide data in Body as per the format you want. Wooo Hoooo! You will get a response with created incident in format you have selected in the request. You can follow the same steps for retrieve incident or for any other action on any table or with any other api. Access Validation is still applied as per access rules defined in your instance for inserting, retrieving and updating records in the instance. So you need to provide right access to the user used in integration. And that's it! You've successfully set up OAuth 2.0 integration with ServiceNow. Remember, security is important. Always store your 'Client Secret', 'Access Token', and 'Refresh Token' securely. Be aware of the access token's expiry time—refresh it before it expires to maintain seamless integration with ServiceNow. This guide should provide a basic understanding of API integration with ServiceNow using OAuth. The exact steps and code may vary depending on your application's specific requirements and constraints. Always refer to ServiceNow's documentation for the most accurate and up-to-date information.
- ServiceNow Versions
IT service management (ITSM), IT operations management (ITOM), and IT business management (ITBM) solutions are available through the cloud-based platform ServiceNow. Over the years, ServiceNow has produced multiple versions, each with a unique set of features and enhancements. Here is a brief overview of some of the major ServiceNow versions: Aspen: This was the first version of ServiceNow, released in 2004. It offered basic IT service management capabilities, such as incident management, problem management, and change management. Berlin: Released in 2014, Berlin introduced several new features, including Service Portal, a modernized user interface, and support for mobile devices. Calgary: Released in 2013, Calgary added new features to ServiceNow's ITSM capabilities, such as contract management and software asset management. Dublin: Released in 2015, Dublin introduced several new features, including the Configuration Management Database (CMDB) and the Service Catalog. Eureka: Released in 2014, Eureka introduced several new features, including the Event Management and Performance Analytics modules. Fuji: Released in 2015, Fuji introduced several new features, including the Knowledge Management and Project Portfolio Management modules. Geneva: Released in 2016, Geneva introduced several new features, including the Service Portal Designer and the Security Operations module. Helsinki: Released in 2016, Helsinki introduced several new features, including the Software Asset Management and Service Level Management modules. Istanbul: Released in 2017, Istanbul introduced several new features, including the Machine Learning and Virtual Agent modules. Jakarta: Released in 2017, Jakarta introduced several new features, including the Predictive Intelligence and Incident Alert Management modules. Kingston: Released in 2018, Kingston introduced several new features, including the Mobile Onboarding and HR Service Delivery modules. London: Released in 2018, London introduced several new features, including the Service Mapping and IT Operations Management modules. Madrid: Released in 2019, Madrid introduced several new features, including the Field Service Management and Governance, Risk, and Compliance modules. New York: Released in 2019, New York introduced several new features, including the Customer Service Management and Legal Service Delivery modules. Orlando: Released in 2020, Orlando introduced several new features, including the Agent Workspace and the ServiceNow Developer Program. Paris: Released in 2020, Paris introduced several new features, including the IntegrationHub and the Hardware Asset Management modules. Quebec: Released in 2021, Quebec introduced several new features, including the Service Graph Connector and the ITSM Virtual Agent. Rome: Released in 2021, Rome introduced several new features, including the ServiceNow Safe Workplace suite and the Creator Workflows module. Sandiego: Released in 2022, Sandiego introduced new UI Next Expereince Tokyo: Released in 2022
- How to parse a JSON response in ServiceNow?
In ServiceNow, parsing a JSON response involves using the JSON.parse() function to convert the JSON data into a JavaScript object. Here's an example code snippet: // JSON response string var response = '[{"id":1,"name":"John"},{"id":2,"name":"Jane"}]'; // Parse the response string into a JavaScript object var data = JSON.parse(response); // Iterate over the data object and log each element's name property for (var i = 0; i < data.length; i++) { gs.info(data[i].name); } In this example, the response variable contains a JSON string that represents an array of objects with id and name properties. The JSON.parse() function is called to convert this JSON string into a JavaScript object, which is then stored in the data variable. The for loop iterates over the data array and logs each element's name property using the gs.info() method. It's important to note that if the JSON response is not well-formed (e.g., missing quotes or curly braces), the JSON.parse() function will throw a syntax error. In addition, if the JSON response contains sensitive information (e.g., passwords), it's important to handle it appropriately (e.g., redacting the sensitive data) before logging or displaying it. Example with ServiceNow Data in Response Here is an example of parsing a JSON response containing incident data from another ServiceNow instance: var restMessage = new sn_ws.RESTMessageV2(); restMessage.setEndpoint("https://your-instance.service-now.com/api/now/table/incident"); restMessage.setHttpMethod("get"); restMessage.setRequestHeader("Accept", "application/json"); restMessage.setRequestHeader("Content-Type", "application/json"); restMessage.setRequestHeader("Authorization", "Basic " + Glideapp.parseBase64("your_username:your_password")); restMessage.setQueryParameter("sysparm_limit", "10"); var response = restMessage.execute(); var responseBody = response.getBody(); if (response.getStatusCode() == 200) { var data = JSON.parse(responseBody); for (var i = 0; i < data.result.length; i++) { var incident = data.result[i]; gs.info("Incident " + incident.number + ": " + incident.short_description); } } else { gs.error("Failed to retrieve incident data: " + response.getErrorMessage()); } Lets understand each section of code: In this line, we create a new instance of the sn_ws.RESTMessageV2 class, which is used to construct and send HTTP requests to external APIs. var restMessage = new sn_ws.RESTMessageV2(); Next, we set the endpoint URL for the REST message, which is the URL of the remote ServiceNow instance's incident table API. restMessage.setEndpoint("https://your-instance.service-now.com/api/now/table/incident"); Next line sets the HTTP method for the REST message to "get", indicating that we want to retrieve data from the remote ServiceNow instance. restMessage.setHttpMethod("get"); These following lines set the request headers for the REST message. The "Accept" header specifies that we expect a JSON response from the remote ServiceNow instance, while the "Content-Type" header specifies that the request body (which is empty in this case) is also in JSON format. restMessage.setRequestHeader("Accept", "application/json"); restMessage.setRequestHeader("Content-Type", "application/json"); This following line sets the "Authorization" header for the REST message, which is used to authenticate with the remote ServiceNow instance's incident table API using Basic Authentication. The username and password are concatenated as a string and Base64-encoded using the Glideapp.parseBase64() method. restMessage.setRequestHeader("Authorization", "Basic " + Glideapp.parseBase64("your_username:your_password")); In next line, we set a query parameter for the REST message to limit the number of incidents returned to 10. restMessage.setQueryParameter("sysparm_limit", "10"); This line executes the REST message and stores the response in a variable called `response`. var response = restMessage.execute(); Here, we extract the response body from the response variable and store it in a variable called responseBody. The response body is a string representation of the JSON response. var responseBody = response.getBody(); This line checks if the response status code is 200 (i.e., successful). if (response.getStatusCode() == 200) { If the response status code is 200, we parse the response body into a JavaScript object using the JSON.parse() method and store it in a variable called data. var data = JSON.parse(responseBody); Here, we loop through the array of incident objects in the data variable and log each incident's number and short description using the gs.info() method. for (var i = 0; i < data.result.length; i++) { var incident = data.result[i]; gs.info("Incident " + incident.number + ": " + incident.short_description); } If the response status code is not 200, we log an error message using the gs.error() method, which includes the error message obtained from response.getErrorMessage(). } else { gs.error("Failed to retrieve incident data: " + response.getErrorMessage()); } Example with JIRA Data in Response Here is an example of how to use the sn_ws.RESTMessageV2 API to retrieve data from a Jira instance using its REST API and parse the response: var restMessage = new sn_ws.RESTMessageV2(); restMessage.setEndpoint("https://your-jira-instance.com/rest/api/2/search"); restMessage.setHttpMethod("get"); restMessage.setRequestHeader("Accept", "application/json"); restMessage.setRequestHeader("Content-Type", "application/json"); restMessage.setRequestHeader("Authorization", "Basic " + Glideapp.parseBase64("your_jira_username:your_jira_password")); restMessage.setQueryParameter("jql", "project = YOUR-PROJECT-KEY"); restMessage.setQueryParameter("maxResults", "10"); var response = restMessage.execute(); var responseBody = response.getBody(); if (response.getStatusCode() == 200) { var data = JSON.parse(responseBody); for (var i = 0; i < data.issues.length; i++) { var issue = data.issues[i]; gs.info("Issue " + issue.key + ": " + issue.fields.summary); } } else { gs.error("Failed to retrieve Jira issue data: " + response.getErrorMessage()); } In this example, we first create a new instance of the sn_ws.RESTMessageV2 class. We set the endpoint to the Jira instance's search API endpoint, set the HTTP method to "get", and add the necessary headers for authentication and response type. We also add query parameters to filter the results by project and limit the number of results returned. We then execute the REST message using the `execute()` method and get the response body using getBody(). If the response status code is 200 (i.e., successful), we parse the response body into a JavaScript object using JSON.parse() and loop through the array of issues to log each issue's key and summary using gs.info(). If the response status code is not 200, we log an error message with the response.getErrorMessage() method. Note that in this example, we're using a Basic Authentication scheme to authenticate with the Jira instance. This method is not recommended for production use, as it exposes the username and password in clear text. Instead, consider using OAuth or other secure authentication methods. Here is an example video as well
- Create a form in UI Page to create incident in ServiceNow
In this blog post, we will show you how you can create a form in UI Page which can create an incident record. Navigate to System Definition > UI Pages in the ServiceNow instance. Click on New to create a new UI Page. Give a name for the UI Page, for example, "Create Incident". In the HTML field, add the following code to create a form that contains the necessary input fields and a submit button: Create Incident Short Description: Description: Configuration Item : {{result.name}} Create Incident Reset Save the UI Page configuration. You have created a UI Page that allows users to create incidents with Short Description, Description, and CI fields. When the "Submit" button is clicked, a new incident record is created in the background using GlideRecord APIs. Note that you may need to modify the code to fit your specific requirements and configurations.
- How to Use GlideAjax in ServiceNow
GlideAjax is a powerful feature of ServiceNow that allows you to make asynchronous calls to server-side scripts from client-side scripts. It can be used to perform complex calculations, validate data, update records, or execute any custom logic that cannot be done on the client side. In this blog post, I will show you how to use GlideAjax in ServiceNow scripts with some examples and best practices. The basic steps to use GlideAjax are: 1. Create a server-side script include that extends the AbstractAjaxProcessor class and contains one or more public methods that return data to the client. 2. Create a client-side script that instantiates a GlideAjax object and passes the name of the script include and the method to call. 3. Define a callback function that receives the response from the server and handles it accordingly. 4. Call the getXML() or getXMLAnswer() method of the GlideAjax object to send the request to the server. Let's see an example of how to use GlideAjax in a client script on a form. Suppose we have a script include called MyUtils that has a public method called getFullName that takes a user sys_id as a parameter and returns the user's full name. The script include would look something like this: var MyUtils = Class.create(); MyUtils.prototype = Object.extendsObject(AbstractAjaxProcessor, { getFullName: function() { var sys_id = this.getParameter('sysparm_sys_id'); var user = new GlideRecord('sys_user'); if (user.get(sys_id)) { return user.getDisplayValue(); } return ''; }, type: 'MyUtils' }); The client script would look something like this: function onChange(control, oldValue, newValue, isLoading) { if (isLoading || newValue == '') { return; } //Create a GlideAjax object and pass the name of the script include var ga = new GlideAjax('MyUtils'); //Pass the name of the method and the parameter ga.addParam('sysparm_name', 'getFullName'); ga.addParam('sysparm_sys_id', newValue); //Define a callback function ga.getXML(function(response) { //Get the answer from the response var answer = response.responseXML.documentElement.getAttribute('answer'); //Display an alert with the answer alert('The full name of the assigned user is ' + answer); }); } Some best practices to follow when using GlideAjax are: Use descriptive names for your script includes and methods. Use sysparm_ prefix for your parameters to avoid conflicts with system parameters. Use getXMLAnswer() instead of getXML() if you only need the answer and not the whole XML response. Use try/catch blocks and gs.log() statements in your server-side scripts to handle errors and debug issues. Use appropriate security checks in your server-side scripts to prevent unauthorized access or data manipulation. Use GlideAjax sparingly and only when necessary, as it adds overhead to the server and the network. I hope this blog post helped you understand how to use GlideAjax in ServiceNow scripts. If you have any questions or feedback, please leave a comment below.
- What is ServiceNow?
ServiceNow is a cloud-based platform that provides software solutions for IT service management, IT operations management, and IT business management. It is designed to help businesses streamline their operations, automate workflows, and improve productivity. One of ServiceNow's key strengths is its ability to integrate multiple tools and services into a single platform, enabling businesses to manage their operations more efficiently. The platform is highly customizable, allowing it to be tailored to meet the unique needs of each business. IT service management is a crucial area of focus for ServiceNow. The platform offers a variety of features and functionalities to assist businesses in managing their IT services effectively, such as incident management, change management, problem management, service catalog management, and asset management. ServiceNow also places significant emphasis on IT operations management. The platform offers a range of tools and services to help businesses manage their IT infrastructure efficiently, including network monitoring, event management, configuration management, and discovery and dependency mapping. Finally, IT business management is a rapidly growing area of importance for businesses. ServiceNow offers a range of tools and services to help businesses manage their IT budgets, resources, and projects more effectively, including project management, resource management, demand management, and financial management. ServiceNow has become a popular choice for businesses looking to optimize their operations and improve productivity. The platform's flexibility and variety of features make it suitable for businesses of all sizes and industries.
- How to activate a plugin in ServiceNow
ServiceNow is a cloud-based platform that provides various solutions for IT service management, IT operations management, IT business management, and more. One of the features of ServiceNow is the ability to extend its functionality by activating plugins. Plugins are sets of files that contain code, configuration, and UI elements that enable new features or integrations with other systems. In this blog post, we will show you how to activate a plugin in ServiceNow using the following steps: 1. Log in to your ServiceNow instance as an administrator or a user with the admin role. 2. Navigate to System Definition > Plugins. 3. Find the plugin that you want to activate by using the filter or the search box. You can also browse the available plugins by category or vendor. 4. Click the plugin name to open its details page. 5. Review the plugin information, such as description, version, dependencies, and activation status. Some plugins may require additional steps or prerequisites before activation, such as requesting an entitlement from ServiceNow or installing another plugin. 6. If you are ready to activate the plugin, click the Activate/Upgrade related link. A dialog box will appear to confirm your action and show you the progress of the activation process. 7. Depending on the plugin size and complexity, the activation may take several minutes or longer. You can monitor the status of the activation by refreshing the plugin details page or by checking the System Logs > Transactions module. 8. Once the activation is complete, you will see a message indicating that the plugin is activated. You may also need to log out and log back in to see the changes in your instance. Congratulations! You have successfully activated a plugin in ServiceNow. You can now explore and use the new features or integrations that the plugin provides. For more information on how to use and configure plugins, please refer to the official ServiceNow documentation or contact your ServiceNow administrator.