ServiceNow News
662 items
Classic UI:
var sURL\_editparam \= gs.action.getGlideURI().getMap().get('sysparm\_aparameter');
if (sURL\_editparam \== 'true') { gs.addInfoMessage('parameter passed); }
Portal:
var sURL\_ed...
Get URL Parameter - server side script (portal or classic UI)
Import
·
about 5 years
www.cloudminus89.com
cache
example HTML:
<div> <a href\="{{data.profile\_url}}" class\="h4 text-primary m-b-sm block"\> <span class\="ng-binding"\>Edit Profile</span> <i class\="fa fa-edit"\></i> </a> </div>
\[
var ...
Service Portal: pass a url parameter to a widget on a page
Import
·
about 5 years
www.cloudminus89.com
cache
where the script needs to run on all 3,
[ has an entry with requires roles ...
Prevent admin from overriding UI action conditions
Import
·
about 5 years
www.cloudminus89.com
cache
alternative approach to returning multi values on Ajax call
client script
try{ if (newValue \== '') { return; } var ga \= new GlideAjax('UserClientScriptUtil'); ga.addParam('sysparm\_name', 'get...
AJAX call example 1a: return multiple values (Using JSON)
Import
·
about 5 years
www.cloudminus89.com
cache
code a new processor:
[ || "";
Haven't tested these all recently within global/local scopes, so feel free to have a play! option 1 use ...
Javascript scripting: set variable to something or blank string
Import
·
about 5 years
www.cloudminus89.com
cache
https://docs.servicenow.com/bundle/paris-application-development/page/script/server-scripting/concept/c\_ScriptableServiceCatalogVariables.html
e.g. back-fill a missing variable
var gr \= new Gl...
ServiceNow Scriptable service catalog variables - update a variable
Import
·
about 5 years
www.cloudminus89.com
cache
see
https://community.servicenow.com/community?id=community\_question&sys\_id=d9c73a60db483f8413b5fb24399619bd
it seems that you need to get the sys\_id of the REQ table
GlideSysAttachment.cop...
Copy attachments from email when using cart object in inbound action, set target record
Import
·
about 5 years
www.cloudminus89.com
cache
[ || !gs.isInteractive()
script:
(function executeRule(current, previous /\null when async\/ ) { //--see STRY0010718 for full background "Pentest - Limits on non-IT...
Prevent high volume spam api calls on task table: my version for Incident table
Import
·
over 5 years
www.cloudminus89.com
cache