Skip to main content

Posts

Showing posts from March, 2023

ServiceNow Editor Macros

 ServiceNow Editor Macros LinkedIn March 15, 2023 Editor macros are a powerful feature in ServiceNow that allow you to save time and write cleaner, more efficient code?! 🤖💻 example of creating an editor macro for one of the most common code blocks you may find yourself writing: a GlideAjax call. Editor Macros are a powerful feature in ServiceNow that allows you to save time and write cleaner, more efficient code. In this post, I share an example of creating an editor macro for one of the most common code blocks you may find yourself writing: a GlideAjax call. 🤖💻 What is GlideAjax? GlideAjax is a client-side API in ServiceNow that allows you to make asynchronous calls to server-side scripts and retrieve data from them without requiring a page reload. It enables you to build dynamic and responsive web interfaces that interact with server-side logic without having to reload the entire page. GlideAjax works by invoking server-side scripts or business rules using an AJAX-style request.

ServiceNow interesting LinkedIn Reads

ServiceNow interesting LinkedIn Reads:  Do you know how much storage space you have available on your  #ServiceNow  instance? Do you know how much you’re “allowed” to have? What happens if you exceed that? Can you actually exceed it? What tables are taking up the most space? When you establish a ServiceNow contract, there’s normally a “Hosting Details” section of the document that details the number of instances you’re purchasing as well as the storage limit for each. In the attached image, you’ll see an example of 4 instances, each with 4TB of storage. The average customer won’t easily exceed that, but if you did, you can purchase additional storage in 1TB increments. ServiceNow will reach out to you to discuss things once you approach/exceed that limit. What’s the limit for the current servers? Here’s a quote from a ServiceNow employee in this  #ServiceNowCommunity  post  https://lnkd.in/etTpukB7 : “For your info, 4TB should be a contractual limit, not a physical/Technical limit. The

ServiceNow: add an OR condition to GlideRecord if the initial lookup fails

add an OR condition to GlideRecord if the initial lookup fails var queryField = 'number' ; var rawField = 'INC0010001' ; //--un-comment to test EQUALS //var rawField='5'; //--un-comment to test LIKE var tableName = 'incident' ; var res = getReferenceFromRaw ( tableName , rawField , queryField ); gs . print ( 'result=' + res ); function getReferenceFromRaw ( tableName , rawField , queryField ) { // return if raw field is empty if ( rawField == '' ) { return '' ; } try { //-- var grTable = new GlideRecord ( tableName ); grTable . addQuery ( queryField , rawField ); //--EQUALS query grTable . setLimit ( 1 ); grTable . query (); if ( grTable . next ()) { //--gs.info('EQUALS');//--not advisable to uncomment if large volume of logs written return grTable . getUniqueValue