Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Developer forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Forum Posts

How to use GlideAggregate

Hi All how can i use Glide Aggregate rather than using .getRowCount() in my code? Thanks.  var userGr = new GlideRecord("sys_user"); userGr.addEncodedQuery("active=true^u_country=4538b7111b121100763d91eebc0713f1"); userGr.query(); if(userGr.hasNext(...

yoli1 by Tera Contributor
  • 1672 Views
  • 5 replies
  • 0 helpfuls

Resolved! Sel Limit via sys_properties

Hi All,I have a requirement to create a cleanup job on 'sysapproval_approver' table so that it can clean the records pending for more than a year. I want to set the limit to 100 via system property and want to call that property in the script. I do n...

Rooma1 by Tera Contributor
  • 1947 Views
  • 9 replies
  • 3 helpfuls

Script to Remove role for bulk users under one group

Hi Guys, I am looking for background script / fix script to remove more than 2k users who are wrongly assigned with a role ( which is not inherited  ) under one of the group. I know ,removing user role, by going to each user record and move the role ...

Script is returning null in flow designer

Hi all, I created a flow as shown in below image .   In create catalog task, I tried to set the field assignment group through scripting to get the group value from decision table but it was returning null for below code:: var UserCompany = fd_data._...

NagendraBabu32_4-1711091430459.png NagendraBabu32_6-1711091705415.jpeg NagendraBabu32_0-1711091258553.png NagendraBabu32_2-1711091329461.png

Resolved! Error when setting item in Script Include

Hi there,  when working with a scoped Script Include, I face the issue, that I cannot write into the document of the request.My Script Include is defined similar to this:  var TestAjax = Class.create(); TestAjax.prototype = Object.extendsObject(globa...

Resolved! Cross scope error from Global to Global

Hi everyone, I am encountering an odd issue. In Flow Designer, I have a simple "Look Up Records" action. This should look up records on the sys_documentation table (where Table = sys_user and Language = English). I have created this flow in the Globa...

Anna T_ by Tera Expert
  • 2812 Views
  • 5 replies
  • 0 helpfuls

Resolved! Cannot view "sys_created_by" on the sp_log list?

I tried every which way to show sys_created_by as a column on the sys_log list.  To no avail.First, when I click on the gear for "Personalize List", I don't even see sys_created_by as an option: Ok, let me try to force feed it on the sys_ui_list reco...

xiaix_0-1691089967032.png xiaix_1-1691090029320.png xiaix_2-1691090055798.png xiaix_3-1691090089084.png
xiaix by Kilo Sage
  • 2110 Views
  • 6 replies
  • 1 helpfuls

Resolved! Email Script Isn't Working

Hey All,  I have an email script that works properly when I run it via the background script, but when I preview it for the email notification, it isn't working.  My email notification is running off the change_request table, but I'm using the sysapp...

SampleV3.PNG
Community Alums by Community Alums  
  • 2871 Views
  • 9 replies
  • 1 helpfuls

Resolved! gs.include() versus new ScriptInclude()

Came across a few examples where out-of-box code may reference gs.include('ScriptInclude');But then what would be the difference (if any) in using gs.include('ScriptInclude'); versus var foo = new NewInclude(); I'm curious as to the differences and...

kungfuu72 by Giga Expert
  • 10093 Views
  • 5 replies
  • 8 helpfuls

How to turn off MFA for Admin user in vendor instance

Hi.  I would like to turn off MFA for the admin user in my vendor instance provided to me as part of inclusion in the TPP program.  For the life of me I cannot figure out how to do this.   I've gone to the user admin section and it says it's not acti...

andy74 by Kilo Contributor
  • 13634 Views
  • 10 replies
  • 5 helpfuls