Quantcast
Channel: ServiceNow Community - Service Catalog
Viewing all 209 articles
Browse latest View live

Unable to create catalog request from requestor cart through catalog scripting when requestor is different than logged in person

$
0
0

Hi,

I am trying to create catalog request by catalog scripting. There is a record producer where I can change the requestor for the catalog item being ordered. The script for creating catalog request for the catalog item written in record producer is as follows:

var myCart = new Cart();
if(gs.getUserID() != producer.u_requestor) {
myCart.cart = _getCart(producer.u_requestor);
myCart.clearCart();
gs.print(myCart.cart.user.user_name);
}
var item = myCart.addItem("bd9663b3183f9800bb172bf3a6f7e2c8", 1); // sys_id of catalog item, quantity

read more


Using a Wait Condition on SCR Item workflow

$
0
0

As part of a complex onboarding process, a single workflow must be completed before other workflows are kicked off. The initial workflow to create an AD account must be completed before the other items that are attached to the request can be kicked off. The AD account workflow once completed will run a script to update the Request state:

var rq = current.request.getRefRecord();
rq.request_state = 'requested';
rq.update();

read more

variable with suggestions in a catalog item

$
0
0

Hi everyone,

I'm trying to develop a variable in a catalog item that shows the 'short description' field from the incident table for autocomplete the variable. I've tried to develop the variable as a reference with attributes, but when I select a value from the reference, the remaining value is the 'number' (the 'Display' column in the dictionary).

Anyone has an idea? Or has developed something similar?

Thank you so much!

Best regards,

jj,

Help with Script to Auto Close 2 WF Tasks

$
0
0

I am creating 3 tasks when a WF kicks off. 1 is open and 2 are pending with everything filled out in them. I need them open until the task 1 completes. At that time i need to get them to Auto Complete. I added this but it keeps erroring for some reason any ideas. There are additional tasks after it also.

task.state == 4;
task.work_end = nowDateTime();
task.active = false;

How to disable breadcrumbs on Catalog Items

$
0
0

Hello,

Is there a way to turn off the breadcrumbs that now display underneath catalog items?

We're in the process of testing an upgrade from Aspen to Calgary, and one of the problems I'm seeing is the new Service Catalog breadcrumbs displayed beneath each catalog item.

When you search the catalog, the items found will display the breadcrumbs to the categories they live in beneath the item; when you're in a regular category display, they won't display the breadcrumbs for the current category, but they will display breadcrumbs for each additional category they are in.

read more

Record producer checklist with CI update

$
0
0

I have a record producer with a list of CI item reference fields, each one has a state field next to it which indicates if the CI passed or failed its inspection.

The fields are named consecutively as item_1, item_2 and state_1, state_2.

I'm looking for a way to pull the field values into 2 arrays, ITEMS and STATES.

The idea is once the RP is submitted the state fields of the CI's will automatically be updated.
I can then use data certification to generate tasks against any failures.

read more

Record producer checklist with CI update

$
0
0

I have a record producer with a list of CI item reference fields, each one has a state field next to it which indicates if the CI passed or failed its inspection.

The fields are named consecutively as item_1, item_2 and state_1, state_2.

I'm looking for a way to pull the field values into 2 arrays, ITEMS and STATES.

The idea is once the RP is submitted the state fields of the CI's will automatically be updated.
I can then use data certification to generate tasks against any failures.

read more

Order Guide loading all catalog client scripts from all tabs on every tab

$
0
0

I'm testing an upgrade of our instance to Calgary CCA6, and I've found that after the upgrade, whenever I go to an order guide, the guide loads and runs every onLoad and onChange catalog client script, and every catalog UI policy, from every tab on the guide no matter which tab it's on. This is causing some significant performance hits on one of our larger order guides.

I duplicated the behavior on Demo with an admittedly much simpler order guide with an onLoad catalog client script throwing an alert for each tab:

read more


Filter locations on checkout based on users company.

$
0
0

Hi,

I am looking for a way to have a custom checkout in my SN instance.

I have three companies using the one instance of ServiceNow (all owned and operated by an overarching company).

Each company would like different options in the checkout but cannot figure out how this is done.

I have seen this article on how to add extra fields to the checkout but I am not sure how to only show a specific field depending on the company that the requesting user belongs to.

read more

Call Service Catalog Item from UI Action with an input parameter

$
0
0

This Form Topic will show how to Call Service Catalog Item from UI Action with parameter.

1) Setup the UI Action:

Form button: true

Onclick: Linkit()

Script:

function Linkit() {

// Retrieve the record sys_id
var cm = g_form.getUniqueValue();

// Build the URL to call the Service Catalog Item "Database Restore"
var url = "com.glideapp.servicecatalog_cat_item_view.do?sysparm_id=508b6735c0a800050056c0334b734118&sysparm_cmdb_ci_in=" + cm;

// Call Service Catalog Item
win = window.open(url, '_self');
win.focus();
}

read more

Adding Image or Formatted Text to the 'Help Text' field on a Catalog Variable

$
0
0

On a Catalog Variable you can display a help tag and corresponding help text that the person can view for 'More Information' on the Catalog Item form. Currently this appears to just be a plain text field....is there a way to add formatted text or even an image to this field so when the person clicks the 'More Information' link the image or formatted text will appear?

Catalog Client script not loading in Variable Set

$
0
0

I have a variable set that appears on 5 catalog items. I have two catalog client scripts that set some of the variables in the set. The scripts aren't loading when the items with the variable set loads. I'm stumped. I'm not seeing any javascript errors in firebug as the page loads. I've gone so far as to create a new item with nothing on it but that variable set, and the scripts still don't load. Where do I look next?

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

Create task from Lookup from table and Lookup value field

$
0
0

Need help on how to set-up a task to be directly sent to Site Support XXX if variable used is Lookup from table and Lookup value field. Attached is a screenshot of what I'm doing and seems like I can't make anything work in the workflow.. Appreciate your kind help, thanks.

Requested Item - Make Fields confidential

$
0
0

Hi there,

I need to create a form for one of our teams but it has some fields in it that have salaries/wages and these therefore need to be made confidential once the request has been submitted, is there a way this can be done?

This form is for a Contractor Extension and will therefore have the rate they are paid etc as the Servicedesk can chase up requests for users they can see all fields but the rates field cannot show when they are looking at the item, only the person who has submitted the request and the teams who need to action the request must be able to see these fields.

read more


Prevent user from approving their own request

$
0
0

I have a variable set that includes two reference fields 'caller_id' and 'manager'. I want to prevent the 'manager' reference field from displaying the same name that's in the 'caller_id' field. What script would I use in the Reference qualifier field?

set a delegate script

$
0
0

I have created a catalog item to set a delegate for someone who is out on vacation.
once approved the item runs a script to set the delegate by itself, runs a 1 minute timer, then closes the ticket.

the issue i am having is that the item works fine if the approver is an admin or if an admin approves it.. but when a normal user approves it the script completes with no errors but doesn't write to the delegate table... any ideas as to why?

___________script_____________

setdelegate()
function setdelegate()
{

var newdelegate= new GlideRecord('sys_user_delegate');

read more

Service Catalog Issues Possibly Related to Calgary

$
0
0

We are experiencing some issues with Service Catalog which seem to be a result of upgrading to Calgary (CCA6). All of these issues are not readily reproducible and do not happen the majority of the time:
1) When a request is approved all the variables in one of the requested items are blanked out. There have been several reported occurrences of this and seems to be fairly regular since we upgraded (2 weeks ago).
2) Occasionally cart items will be unintentionally deleted from a cart when continuing to checkout (2 step checkout enabled) without any action from the user.

read more

Using an array to store Workflow Scratchpad variables?

$
0
0

I've got catalog items where multiple 'Items' can ordered with a single 'Request'. I've got workflow running at the Request level, so I can get a Manager approval of the entire Request. I'm setting the Category of the items (they'll all be the same for this Request) and a list of the 'Items' to the scratchpad with this code:

var gr = new GlideRecord('sc_req_item');
gr.addQuery('request',current.sys_id);
gr.query();

workflow.scratchpad.item=new Array();
while(gr.next()) {
workflow.scratchpad.category=gr.cat_item.category.title;

read more

Dynamic Variable

$
0
0

Hi,

Can anybody suggest me, how to add multiple variables in Service Catalog Form using Add Button on the form.
And how we can save/show it on Request Item after click on the "Order Now".

Thanks in advance.

Regards,
Sharanjeet

Viewing all 209 articles
Browse latest View live