logo

NJP

Expanding the Stage Field by Default on the Order Status Page

Import · Nov 21, 2012 · article

I was curious about a question someone asked on the Community about auto-expanding the stage field on the Order Status page for Service Catalog Requests, so I did a little digging and came up with a pretty simple solution that works quite well I believe.Step 1. open the "com.glideapp.servicecatalog_checkout_view" UI Page record

Step 2. Look for the following line of code:

Step 3. Add 3 lines of code to end up with:

togglePreference("$[sc_req_item.sys_id]");

Now when your users submit an order the Stage field is automagically expanded to reveal all the stages:

image

As the page is created, the togglePreference() function is called for each item, expanding the stage field by default. It is currently running in demo10 at the moment.

Reminder: modifying the out-of-box "com.glideapp.servicecatalog_checkout_view" UI Page means you will own it from now on, and you will not receive any automatic updates to it. I don't find it to be a big deal, as you can always grab the newest code, make your appropriate changes and save it again in your instances.

View original source

https://www.servicenow.com/community/in-other-news/expanding-the-stage-field-by-default-on-the-order-status-page/ba-p/2293607