Posts

Showing posts from December, 2022

docs.servicenow.com - Consuming Information In A New Way

Image
                           How to consume docs.servicenow.com We all use docs.servicenow.com, but do we really know how to better use it for learnig things in servicenow. It's fascinating how servicenow has evolved over time and also the way it's learning process has evolved. Now we have learning.servicenow.com, developer.servicenow.com to have a hands-on practicle knowledge of different modules. There is one question that I am often asked by people who want to learn new things in servicenow, "I want to learn so much new things, but don't know from where to start". If they go to docs.servicenow.com , they find informations scattered, so they are not sure from where to start and where to end. Here I am sharing a way, how you can better use servicenow doc for learning topics in a  sequential way so that you can start right and end right. This way of using servicenow doc has been from the time of wiki.servicenow.com and fortunately it has not changed, it's still

query() - What we do not know

Image
               Do you know that query() method of GlideRecord object accepts parameter as well. Many of us may say that ofcourse I know at client side query() methods accept callback function as a parameter which makes it asynchronous. That's right but is that all, what about server side ? Recently I was going through servicenow docs and was surprised to see that at server side also query() method accepts parameter and that parameter is:  'filter condition'. Yes, you read it right, it takes filter condition as a parameter. Although I couldn't find any documentation around it, so did some searching around it and let me tell you all that I could find, how to use it, where it can be used, and it's limitation. At server side query() method accepts two paramaters first the field name and second the field value.  Let's see an example: var gr = new GlideRecord ( "incident" ); gr . query ( "priority" , "2" ) gs . print ( gr . getRowCou