ServiceNow Learning#18: Functionality: Scoped GlideSystem - info.

Shamma Negi
Kilo Sage
Kilo Sage

Hi All,

 

As we all know that we use gs.info in scoped app for getting the logs information. Its return type is "void"

A new features and parameter gs.info give us which we use and define dynamic also. See the below example:

 

 

Scoped GlideSystem - info(String message(mandatory), Object parm1(optional), Object parm2(optional), Object parm3(optional),Object parm4(optional), Object parm5(optional))

 

gs.info("This is an info message");
var myFirstName = "Shamma";
var myLastName = "Negi";
gs.info("This is an info message from {0}.{1}-{2}:{3}", myFirstName, myLastName , gs.getUserName(), gs.hasRole('admin'));

 

Result :

 

*** Script: This is an info message
*** Script: This is an info message from Shamma.Negi-admin:true

Glide System - Scoped (servicenow.com)

Hope this helps you.

Please mark this helpful if this helps you.

 

Regards,

Shamma

 

Regards,Shamma Negi
0 REPLIES 0