THURSDAY, FEBRUARY 09, 2012

Overriding the ess Checkout View for Catalog Requests

S

ervice-now’s service catalog interface is designed to give users a more familiar “Amazon.com-like” ordering experience. While this interface meets the needs of most customers, there are areas where certain modifications may be desirable. One of these areas may be the catalog checkout page. The out-of-box setup always presents every user with a specific checkout or ‘ess’ view for the ‘sc_request’ (Request) table. This checkout page is forced every time any user attempts to view a request record using the ‘ess’ view.

Request Checkout View

But what if you would rather use the standard ‘ess’ view that is similar to the rest of the forms in the system? Something like this…?

Request ess View

While this isn’t a typical modification, this article shows how you could accomplish it.

This modification requires an override of out-of-box Service catalog functionality that may cause issues with later upgrades. You should make a note of any of these modified records so that you can restore them to their out-of-box state in the future if necessary. Please also note that while this modification may be useful in certain situations, the vast majority of Service-now implementations do not require it.

1Navigate to the ‘Navigation Handlers’ table by using the following URL (‘https://your-instance-name/sys_navigator_list.do’) or by typing ‘sys_navigator.list’ in the left navigation search bar.

2Open the ‘sc_request’ record (which should be the only record in the table) and change the ‘Table’ field value to ‘–None–’. This effectively disables the navigation handler that overrides the ‘ess’ view for the ‘sc_request’ table.

Next, you need to force the standard ‘ess’ view when a user sees the request record immediately after submitting a request.

3Open the ‘com.glideapp.servicecatalog_checkout_view’ UI page under ‘System UI -> UI pages’ and change the name to ‘com.glideapp.servicecatalog_checkout_view-OLD’

4Create a new UI page with the following settings…

UI page
Name: ‘com.glideapp.servicecatalog_checkout_view’
Description: The final “checkout” screen you see in the service catalog after a successful order is placed.
Note: This page is an override of the out-of-box UI page for checkout. It redirects the user from the out-of-box checkout page to a standard ‘ess’ view for the ‘sc_request’ table.
HTML:

<?xml version='1.0' encoding='utf-8' ?>
<j:jelly trim='false' xmlns:j='jelly:core' xmlns:g='glide' xmlns:j2='null' xmlns:g2='null'>
   <script language='javascript'>
      addLoadEvent(overrideView);
      function overrideView() {    
         var url = 'sc_request.do?sys_id=' + '${sysparm_sys_id}' + '$[AMP]sysparm_view=ess';
         window.location = url;
      }  
   </script>
</j:jelly>

5Verify the security for all of the elements and related lists on the new form. Since this view is not designed for use by ‘ess’ users out-of-box, you’ll need to make sure that the security on the request and request item tables meets the needs of your organization.

Overriding the Request Item (sc_req_item) ess viewThe default behavior for users with no role is to force the ‘ess’ view for the Request Item table. If you find it necessary to override the ess view for the Request Item table you can modify or disable the ‘Catalog Scripts’ AJAX Script record. You can find this record by navigating to ‘System Definition -> AJAX Scripts’ if that module is active in your instance or you can enter ‘sys_script_ajax.list’ in your left navigation filter to navigate directly to the list without a module.

Comments

Posted On
Mar 08, 2010
Posted By
alli

Hi Mark,

What if I just want to change the words in the out of the box checkout page? Like I want to remove the bookmark statement cause it might cause confusion to end users. where should I edit this?

as always your timing with your post is perfect!!

cheers

Alli

Posted On
Mar 08, 2010
Posted By
Mark Stanger

The information for the out-of-box checkout page is in the ‘com.glideapp.servicecatalog_checkout_view’ UI page from step 3 above. If you wanted to remove the bookmark link, you would just need to search for and remove this section of code from the page.

${gs.getMessage('You may also bookmark the following link to get back to')}$[SP]
 
<a class="linked" id="permalink" target="_top" href="nav_to.do?uri=$[permalink]">$[sc_request.number]</a>.
 
<br /> ${gs.getMessage('bookmark_link_help_note')}
Posted On
Mar 09, 2010
Posted By
alli

Thanks Mark,

It’s working, as always

Cheers

Leave a Reply


Notify me of followup comments via e-mail. You can also subscribe without commenting.

Latest Comments

  • Aric: Finally figured out what I was doing wrong, incase someone else wants to do this. Mark is correct about needing...
  • Mark Stanger: You’ll probably need at least 3 total ACLs then. You’ll need one...
  • Mark Stanger: Hey Paul, I assume you’re talking about ‘task_ci’, not ‘task_group. If so, the...
  • ND: Hi Mark, This is cool. How can I do same at the form level. I have created a slushbucket variable and I want to...