Quantcast
Channel: ServiceNow Community - Post implementation
Viewing all 108 articles
Browse latest View live

De-referencing current record in a GlideRecord query

$
0
0

In an effort to componetize my code, I have the following javasript class method:

// Return a list of SalesOrderSiteInfo records that are related to the current (SalesOrder) record
ListOfSiteInfoRecords: function(SalesOrder_sys_id)
{
var toReturn = [];
var sites = new GlideRecord('u_salesordersiteinfo');
sites.addQuery('u_salesorder', SalesOrder_sys_id);
sites.query();
while (sites.next())
{
toReturn.push(sites);
}

return toReturn;
},

read more


Override Syntax Checker

$
0
0

Hello.

Is there a way to override the script syntax checker on Client Scripts? I am trying to use a line continuance in a DOM script however the syntax checker keeps me from saving/testing. Is there a way around it?

SOAPMessage Workflow Activity

$
0
0

I am setting up a workflow to call a webservice using the SOAPMessage activity. The webservice takes a list as a request parameter i.e.

<oneList><one>abc</one><one>def</one></oneList>

The wiki says ' Variables to substitute into the SOAP Envelope defined in the SOAP Message Function record. This string should be in the format name1=value1, name2=value2, .

Now, in this case, how do I pass the parameters?

Field Style for incident SLA warning and breach

$
0
0

Hi there

Ive been asked to set up a style rule which changes the background of the incident number field to orange when the task sla reaches 80% (warning) and red when the task sla is breached.

Any ideas guys? ive no idea what I should put in the style value field

Hoping in anticipation
M

How to interactively show/hide custom fields/form sections for IT users – what’s the best approach?

$
0
0

Here is a problem:

We need to be able to show/hide some Request (custom table) fields, based on a selected subcategory. What is the best approach to do that? (see screenshot attached)

- We can use form sections + UI policy to show/hide them, but it’s not a good option, because when you have even 2 custom form sections it slows internet browser when loading a page.
- Record producer it’s not a good option neither – those forms and fields for IT users only and they don’t want to go through several steps and clicks to submit a request.

read more

How to hide an incident form while it's loading?

$
0
0

Is it possible to hide an incident form while it's loading?

We have a huge form with a number of hidden fields/form sections but when it's loading users can see all of those until UI policies hide them. I know it's up to 1-1.5 seconds, but it's really annoying.

It would be great to display something like 'Form is loading...' while it's loading, apply UI policies and then just 'turn it on' and show it to a user. Is there any way how to do that?

- Andrew

Switch Statement in Task

$
0
0

Hi all,

I am trying to make a switch statement inside of a task however I don't understand why this isn't working. The short description and description both come up blank when I use the function. When I remove the comment out the function the short_description and description print, but they both say undefined.

Any ideas?

Thanks in advance.

var Group;
getGroup();
task.short_description = "User (" + custom_name + ") access to Groups";
task.description = "Please add user to Groups: " + Group;

function getGroup(Group)
{
switch (current.home_id)
{
case 20:

read more

Display field as plain text (not in a text box)

$
0
0

I would like to display the contents of a field as plain text in the incident form and not in a text box. This is useful as our technicians use a click to dial plugin in their browsers. This plugin does not work with the numbers in a text box.

I managed to achieve some success (see below) by using a text annotation in the form and entering some css to mimic the look of the other field labels.

sn_field_display

<span style="padding: 4px 101px 5px 6px; background-color: rgb(192, 192, 192);">Phone:</span><label> ${incident.caller_id.u_phone}</label>

read more


current.setAbortAction(true) causes the error message 'Invalid update'

$
0
0

Guys,
I got stuck with current.setAbortAction(true) in a business rule... I have a simple business rule on an incident table:
When: Before
Update: yes
Condition: current.category=='Software'&&!current.hasAttachments()
Script:

gs.addInfoMessage("No attached documents found! Operation cancelled.")
current.setAbortAction(true);

read more

Is it possible to purge "Loaded" Update Sets from Production instance?

$
0
0

We have a number of "Loaded" update sets in the production instance that will never be committed. We'd like to permanently remove these.

Given they're still in a "Loaded" state, is it safe to simply delete these update sets?

Thanks in advance.

Kathy

Creating Change Record using glideRecord functions. But not returning the CR number.

$
0
0

Hi,

I am able to create a Change Record (CR) using below PERL script using $glideRecord->setValue() , $glideRecord->query() and
$glideRecord->update() functions. But these functions never returns the CR number.

Is there any way to get the CR number immediatly after its created using these functions ? Is there any similar functions for glideRecord that will
return the Change Record number ?

(it works well for Incidents .. not for Change Records)

(We can open the change_request table and get the cr number. but that takes some amount of time. )

The code is below:-

read more

Interactive Charts and Jelly

$
0
0

Hi Guys,
I’m working on some nice charts in ServiceNow, which are based on morris.js components (http://www.oesmith.co.uk/morris.js/). It’s really simple and there are no problem if you just want to display a static chart, which loads data only once, before it’s displayed.

But now I need to put some parameters and ‘Refresh/Apply’ button on a form and be able to refresh the chart correspondingly. I think it should be possible with some javascript, but I don’t know how to ’link’ that button with data retrieval and chart refresh.

Any ideas how to do that?

read more

Task Email Notifications not being sent

$
0
0

Ok, so here's the situation . . .

I created a workflow for a specific catalog item that is WAAAAAY too complicated. Honestly, its ridiculous. But it works. Actually, it almost works.

The flow works very nicely except for the fact that users are not receiving task notifications in the following scenario.

1. Customer opens request
2. User A completes first task (Task 1) , which then generates three other tasks (Task 2, Task 3, Task 4). All new tasks have a designated assignment group but not an Assigned to user.

read more

Show field based on another fields content

$
0
0

I have created a field on the Incident form that I would like to remain hidden unless certain users are added to the Assigned To field, at which time I would like it to become visible and mandatory. I assume this can be done through Client Scripts and/or UI Policy but I'm not well versed enough in Javascript to figure out how to code it.

Modify the columns in SDLC Planning Board?

$
0
0

Is it possible to modify the list view on the SDLC Planning Board? It says it is using the SDLC view, but it is clearly not. It only shows Number, Short Description, Priority, and State. The SDLC view of Enhancements (for example) has been modified to show Assigned To in addition to what was previously mentioned.


How to make a reference to a CSS file?

$
0
0

Guys,
do you know how to make a reference to a CSS file in UI page? I tried several options with  <link type="text/css" href="... , but with no success. I want to upload CSS file to SN instance and 'link' it to UI page.

- Andrew

How to make your ServiceNow instance unavailable in one simple step (BE CAREFUL)

$
0
0

Guys,
I found that there is a simple way how to make your SN instance unavailable... I was playing with UI scripts (jQuery scripts) and unintentionally set Global to 'true' for some scripts. That affected the entire instance, user interface was just shot down... only SN support team was able to resolve the issue.

DO NOT TRY TO REPRODUCE, just be very very careful, when working with GLOBAL UI scripts.

UI Action to set Assignment group and Assigned to, to the Opened by user.

$
0
0

I am looking to have a UI Action that would set the Assignment Group and the Assigned to fields to the Opened by user and the group and will take the log on user back to the list view. I am not to good at JavaScripting. If I could get some help.

email notification when LDAP connection is broken

$
0
0

Is there a way to generate an email notification when the connection between ServiceNow and the LDAP server breaks? We recently had this issue and I saw entries in the LDAP logs when the scheduled group and user imports tried to run:
2013-07-08 00:00:13 Information LDAP Processing RDN and range LDAP
2013-07-08 00:00:23 Information Communication error: [server URL] LDAP
2013-07-08 00:00:23 Information LDAP Processing RDN and range LDAP
2013-07-08 00:00:23 Information [server URL] LDAP
2013-07-08 00:00:23 Information java.net.SocketTimeoutException: connect timed out LDAP

read more

Styles Problem

$
0
0

I'm trying to highlight a business service on an incident record using styles but do not appear to be getting anywhere with it I'm afraid.

The business service has a field name u_business_service and what I want to do is highlight that field if the business service criticality equals '1 - most critical', field name busines_criticality on the cmdb_ci_service table. If it helps the Business Service field on the incident record is a reference field on the cmdb_ci_service table.

I've tried various ways including setting the style on the CI Code field on the Business Service

read more

Viewing all 108 articles
Browse latest View live