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

Forum Posts

Dynamically Create/Retrieve/Delete JSON in JavaScript

In this discussion of JSON, I would like to show how JSON can be created dynamically in standard JavaScript. This technique could be used in SNow, having a slight modification to create JSON objects.Below is a sample code in HTML and JavaScript to cr...

Unable to attach files to the record

Hi All,In incident module we are unable to add attachment to a single record. Only for one record only we are unable to attach or remove files, for all others it is working as before.It is showing the below Can anyone explain what will be the issue o...

Capture.JPG

JavaScript Executor Question

Hi,I'm trying to run the script below using the JavaScript Executor (Ctrl-Alt-Shift-J). Nothing happens when I click "Run my code." Is something wrong with the code, or is this not the right place to run it?Thanks, JiM <script> //Generic Incident up...

jmuomini by Mega Expert
  • 3685 Views
  • 7 replies
  • 0 helpfuls

Resolved! Encoded Query Not Working UI Page

I am just trying to run an encoded query in a UI Page. I have run many encoded queries, but this is not working.. at all..Here is my query:function Total(){   var counter = 0;   var queryString = 'sys_created_onONThis month@javascript:gs.beginningOfT...

codedude by Mega Expert
  • 1645 Views
  • 4 replies
  • 1 helpfuls

List CI's owned by selected user

Hello Everyone,I want to list all CI's owned by a selected user on a leaver form.This is how I would like it to work:1. User Opens our User Leaving catalog item and selects the name of the user that is leaving in the 'impacted_user' variable.2. Eithe...

order guide variables

I have an Order Guide for a standard new user.   In have set various questions which then trigger various items to be added.   Most of the bits on the describe needs are variables but one ia variable set.   The variable set is to capture the requeste...

mrcarter by Tera Contributor
  • 938 Views
  • 1 replies
  • 0 helpfuls

Remove snc_internal role for end users

Hi Experts,I hope everyone will aware of snc_internal role(OOB role). I have created a background script for removing that role but my seniors are telling that even if we remove the role also it will add automatically again. How we can permanently re...

Why is getReference returning undefined value?

Hi,I am trying to alert a reference field (team_admin).function onSubmit() {var teamad1 = g_form.getReference('team_admin', setAdmin);alert(teamad1.name);Why do I get an undefined value as an alert out of this?

arnabbose by Tera Expert
  • 2581 Views
  • 6 replies
  • 2 helpfuls

Resolved! How to modify the unsubscription message (unsubscribe.do)

Good mornig everybody,I'm using a notification email script to add an unsubscribe link to some notfications ( like template.print('<a href="' + gs.getProperty('glide.servlet.uri')   + 'unsubscribe.do?sysparm_notification=' + email_action.sys_id   + '...

lucap_ by Mega Sage
  • 1418 Views
  • 4 replies
  • 1 helpfuls

Creating custom script generator on ServiceNow

Hi guys,Its been a while since I posted on the community. Anyway, I have an idea on which I will create an onchange generator of the scripts written in a text box.I am using a macro type of variable with div tags included. The code is like this:<?xml...

find_real_file.png