Some PDIs are currently unavailable, and PDI actions are paused. View the latest updates here. Read More

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

Forum Posts

ATF: Error for Step Type "Open a Form (SP)"

Building a Test for our Service Portal Form.  The Portal Page only has the 1 widget on it (which actually uses g_form in the client script) Step:  Open a Form (SP) Result: FAILURE: g_form is not defined. A valid form must have g_form defined I did fi...

function for getting sys_id

Hello,Novice ServiceNow "developer" that would like to know what is the recommended practice for creating a global function that would get the sys_id of a specified record. We use scripts in our record producers to set values for various reference fi...

kendall_lin by Giga Contributor
  • 27857 Views
  • 15 replies
  • 12 helpfuls

Relate request item and change

I have added a variable on a RITM, called 'Related Change' which is a reference to the change table.When i select a change on the RITM form, I would like this to be displayed on a change ticket, under a related list.I have created a new relation, cal...

Handle Integer in GlideRecord

Hi, I am trying to get the next number based on RowCount output. Here is the script   var existingCI = new GlideAggregate('cmdb_ci'); existingCI.addQuery('company','81fca4cbac1d55eb355b4b6db0e3c80f'); existingCI.addAggregate('COUNT'); existingCI....

Resolved! Struggling updating user preference from portal.

Hi, community   I'm having a bad time trying to update a user preference from the Service portal, basically what I need to do is when a user clicks on a link labeled "Dismiss" it  will update a user preference to false, and the element will not appea...

guill3 by Giga Contributor
  • 2841 Views
  • 2 replies
  • 1 helpfuls

Text color change for alert message

Is it possible to change some part of text's color shown using alert message in catalog client script? like alert("If you choose category as personal laptop, then you have to attach <font color='red'>email approval from your manager</font> with this ...

Hafsa1 by Mega Sage
  • 6248 Views
  • 7 replies
  • 0 helpfuls

Set duration field using client script - Display and Set

Hello Everyone, Every time I have worked with duration fields, it is challenging in some type This time it is modifying the duration field value based on a start date and end date. Ideally, we set the value for duration fields like this g_form.setVa...