Quantcast
Channel: ServiceNow Community - ServiceNow Scripting
Viewing all 208 articles
Browse latest View live

Create user account from Email (Advanced)

$
0
0

Well to start, I am not sure where to begin with this so I figured I would ask and see if anyone has any ideas.

I would like to setup an inbound email action to parse an email when it arrives to create a user account. However I would like to have the inbound email action look into the body of the email to fill out the user profile. Example

From: Only run if it comes from X@Y.com or Y@Z.com

Body of email below:

UserID: JoeUser
Email: juser@company.com
VIP: True/False
Title: Desktop Technician
FirstName: Joe
LastName: User

read more


How to populate selected choice list values on glide window "ui_choicelist" macro field?

$
0
0

Has anyone populated selected choice list value on custom ui page choice field when its loaded. I need to populate the incident form selected sate value into custom UI page choice list field.

I have used "ui_choicelist" macro on my custom ui page, when I build this page by using this macro I can see the state field choice list values and displaying default choice value like "None". Is there any possibility to show selected state field choice value on UI page choice field without showing default value.

Due Date Field On Catalog TASK disappears in Variable Editor

$
0
0

I need some advice on how to adjust my catalog task script or the catalog variable. I was able to successfully use a date/time item variable in our SC task as the due date with the following in the Catalog Task Advanced script:

task.due_date = current.variable_pool.separ_date;

read more

Set Date Variable 12 months from now

$
0
0

Hi,

I am trying to create a date validation script on catalog variable to set it to 12 months (365 days) from now but struggling to get it right.

Not only do I need to be able to set the date, but I want the user not to be able to select a date after the 12 month mark.

Does anyone have any suggestions?

Thanks in advance for any help.

Regards,
Dan

Add a role to single user using the script

$
0
0

Please help me how to Add a role to the user using the script

Add event listener to the Add to Cart button

$
0
0

how to add a click event When Add to cart button is clicked

Business rule not working

$
0
0

This is not working..i need to close the ticket not updated more than 3 days if it is in resolved state..12 is the resolved stae value and 3 is the closed complete value..i tried my best it not working..kindly help me on this..

Thanks in advance..

autoCloseEquip();

function autoCloseEquip(){
var ps = 3;
var pn = parseInt(ps);

if (pn > 0) {
var gr = new GlideRecord('u_equipment_engineering');
gr.addQuery('state', '12');
gr.addQuery('sys_updated_on', '<', gs.daysAgoStart(pn));
gr.query();
while(gr.next()) {
gr.state = '3';

read more

Adding fields to slush bucket for MY Work

$
0
0

I received a request to add the Incident State as a default column to My Work and I know it can be done globally by a system admin. I was wondering why the user has a reduced set of fields when selecting from the slush bucket and if there is a way to add additional fields so they could make the decision of what to include instead of making a global change.

Thanks,

Frank


Any way to hide "Time:" output lines from Background Script?

$
0
0

Is there any way to silence the echo'ing back of the SELECT statements when running a Background Script?

read more

Help: Record producers: trying to override column head font color

$
0
0

Hi All:

We are trying to override the font color of the text in the Column heads/list and form captions. When modifying the CSS for these fields, the lighter colors really don't work on the account that the default color is white.

Our business would the column heads and the frames for all the fields in the record producers to be white with the font being black to give a more "Amazon" appearance.

Either:

Here is the property to override the background color for list and form captions: css.table.column.head.background.color. I'm looking for something of the equivalent .

Or:

read more

Mandatory Attachments Order Guide and Catalog Items sharing solution

$
0
0

To start I'm pretty new to ServiceNow. Only been working with it for about 3 months.
I had some requests to make attachments mandatory on catalog items.
When I added that request to an order guide it broke and wouldn't check for an attachment or submit.
I tried many different options and variations and finally go one to work and just wanted to share the solution that works.

I used the many articles on the forums for this solution. :) So i have to say thank you to everyone.

The pieces:
On your catalog item (Requests or Record Producers)

read more

Pull results from a variable lookup select box?

$
0
0

I have a variable, called Variable1 that is a lookup select box, pulling from a table. The table contains entries with values of A, B, and C.

In my workflow, I have an If statement returning a Yes or No. I would like the If statement to result in Yes, if the client script's select box variable selects "A" or "B" as it's value. If "C" is chosen, it would result in a No.

I tried using the following script for the If in the workflow, but am getting GetDisplayValue not defined as an error:

answer = isSmart();

function isSmart(){
var check= getDisplayValue(Variable1);

read more

how to know the user that are in the sysapproval_approver table

$
0
0

how to know the user that are in the sysapproval_approver table
Yes ,actually i want to print the users that are in the sysapproval_approver table using the script.

Print users that are in the sysapprover_approver table using the script

$
0
0

Print users that are in the sysapprover_approver table using the script

Modifying the Banner

$
0
0

Hi Community,

I was just wondering if anyone has customized the ServiceNow Banner (Header)? I found that modifying the UI Macro 'decorate_welcome_header_stripe' will allow you to do some cool things with the banner. I added some custom hover over drop down fields in side the header, as per a requirement. I was just wondering if there was a better way to customize this instead of modifying the macro?

I noticed this from ServiceNow Guru: http://www.servicenowguru.com/system-ui/tweaking-servicenowcom-header-cu...

read more


Scripting a call to on_call_schedule_report.do

$
0
0

I want to automate the process of filling out the form
https://mycompany.service-now.com/on_call_schedule_report.do

So I can read from v_rotation

I am POSTing the URL: https://mycompany.service-now.com/ui_page_process.do?sys_id=e9513e61c0a8...
With the data: groups=8e1a55952baacd00e6c25dd417da1597&start_date=2013-12-10&end_date=2013-12-10&slush_right=8e1a55952baacd00e6c25dd417da1597&sys_action=run&sysparm_ck=3649363db96915404a9702a9348afd06a9b6cda769b5be185ed93b232d624b9a793b39b2

And logging in accordingly. But instead of processing the data I get:

read more

Copy Sys_id is not working

$
0
0

Hi,

Copy Sys_id ui context menu is not working in our client instance after Calgary release.

Has anybody experienced anything like these? Please help us.

Thanks.

We needed a way to allow managers to give control of their group (adding and removing members) to any user/multiple users.

$
0
0

We needed a way to allow managers to give control of their group (adding and removing members) to any user/multiple users.

There are 3 business rules that I used.

Add Managers to Support Group(See Attached)
-This adds and removes members from the Support Group Manager Group.
-This group is how we give users the following role.
-support_group_manager

Add Managers to Manager list(See Attached)
-This adds anyone who is the manager to the manager list.
-This runs the "Add Managers to Support Group" business rule.

Sync Manager List(See Attached)

read more

Alert if choice is not chosen

$
0
0

I added the field u_change_successful which is on the Change Request table to the Change Task form and only show it when the short description of the Change Task contains PIR.

I am trying to pop up an alert from the Change Task form if Yes or No is NOT chosen in the u_change_successful mandatory field upon Submit. Basically, if someone opens the PIR change task and tries to click Successful or Unsuccessful without make a choice on u_change_successful, I want the alert to pop up.

**Change Request table:

read more

Question on UI Resolve Incident

$
0
0

In the incident form, we have a client UI ‘Resolve Incident’ that prompts the user to enter a closure code and a close note.

In the ess view of the incident form, intended for non-itil users, there is no closure code or close notes field.
We want the user instead to enter a customer visible note.

I can have two separate UI’s based on if the user has an itil role or not to handle this issue for most cases.

But I don’t know what to do if an itil user resolves an incident when in the ess view of the incident form.

read more

Viewing all 208 articles
Browse latest View live