ServiceNow News
662 items
in this particular case, an a href was causing problems / blowing up the image (it is embedded in a custom side menu)
HTML
<img class\="homeicon" ng-click\="goToHome()" ng-src\="{{::portal.logo}...
Service portal: change to hover over icon using CSS / redirect to home page
Import
·
almost 5 years
www.cloudminus89.com
cache
where the image is uploaded to images (db\_image) table
HTML:
<div id="homepage-search" class="hidden-xs catalog-bg" ng-init="c.trackPage()">
CSS:
.catalog-bg {
background-image: url('/image...
ServiceNow Service portal: pull in a background image using CSS
Import
·
almost 5 years
www.cloudminus89.com
cache
normally this would happen by default out of the box as the image is located in the header menu
in this case the logo has been moved into a custom sidebar
HTML:
<img ng-click\="goToHome()" ng-sr...
Service Portal: Redirect to home page (hidden behind company logo image)
Import
·
almost 5 years
www.cloudminus89.com
cache
pull the following widget into your OLD portal home page to redirect to your NEW one:
admin can override if they wish to, and toggled on/off via a sys property pulled in via the server script.
HT...
Service Portal: redirect from old portal to new portal
Import
·
almost 5 years
www.cloudminus89.com
cache
function call
var sCurrentGroupMembers \= new <script\_include>().getGroupMembers(group\_sysid); gs.print('sCurrentGroupMembers:' +sCurrentGroupMembers );
var oGroupMembers \= JSON.parse(sCurrent...
ServiceNow - script include: build up the results as a JSON object (array) - example 2
Import
·
about 5 years
www.cloudminus89.com
cache
function call
var res\= findReferences ('963abacbdb2160101beb298a4896xxxx' , 'incident');
gs.print(JSON.stringify(res));
output
\\\ Script:
\[{"display\_value":"INC095xxxx",
"table":"inciden...
script include: build up the results as a JSON object (array)
Import
·
about 5 years
www.cloudminus89.com
cache
call the function:
var cc\_estate\="ABC" var si\= new <script\_include\>(); var res\= si.retrieve\_costcenter\_info\_add(cc\_estate); gs.print(JSON.stringify(res));
gs.print(res.business\_area);...
script include function:
CatalogueHelper.wfDebug("a message- xyz", "debug");
//...
CatalogueHelper.wfDebug \= function(sMessage,sMessageLevel){ sMessageLevel \= sMessageLevel || "info"; var oWo...
Service Catalog: push a debug log to the workflow from script include
Import
·
about 5 years
www.cloudminus89.com
cache
https://community.servicenow.com/community?id=community\_question&sys\_id=0be343e5dbd8dbc01dcaf3231f9619c5
Haven't tested these all recently within global/local scopes, so feel free to have a play...
ServiceNow Service catalog item description: pull in values?
Import
·
about 5 years
www.cloudminus89.com
cache
Transform map to close ageing tasks
this transform will:
\- close RITM
\- cancel RITM workflow
\- close associated sc\_tasks
\- close associated REQ (assuming no other open RITM)
\- close...
transform map to bulk close catalog tasks without sending notifications
Import
·
about 5 years
www.cloudminus89.com
cache
[;
ga.addAggregate('COUNT', 'cost\_center'); ga.addQuery('active', 'true'); ga.addHaving('COUNT', '>', 1); ga.query(); var dupls\=\[\]; dupls.push("T...
[; var gm \= new GlideModal('add\_work\_note'); // UI Page gm.setTitle(title); gm.setPreference("sysparm\_target\_table", "sc\_req\_item"); /...
GlideModal with UI Page: add a worknote / escalate RITM (called via UI Action)
Import
·
about 5 years
www.cloudminus89.com
cache
see
https://docs.servicenow.com/bundle/orlando-it-service-management/page/product/service-catalog-management/task/define-regex-vrble.html
question\_regex table: may be used in association with v...
ServiceNow Question regular expressions (regex table in ServiceNow)
Import
·
about 5 years
www.cloudminus89.com
cache
it seems this is out of the box functionality for catalog variables of type select box with the price set on the question choice.
steps:
· Go to catalog item
· add a variable delivery location ...
ServiceNow Service Portal, catalog: dynamically refresh a price (e.g. home delivery cost) based on a question choice containing a price
Import
·
about 5 years
www.cloudminus89.com
cache
//--hide/show escalate button on RITM var bDisplay \= false; var bDebug \= false; //bDebug = true; //--check if the RITM has passed the estimated delivery time var sDelivery \= grRITM.cat\_item.del...
Complicated Date manipulation: display an escalate button on RITM
Import
·
about 5 years
www.cloudminus89.com
cache