THURSDAY, JANUARY 19, 2017

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.

15 Comments

alli 08-03-2010, 15:15

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

Reply
Mark Stanger 08-03-2010, 18:59

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')}
Reply
alli 09-03-2010, 00:00

Thanks Mark,

It’s working, as always

Cheers

Reply
Kevin Sandberg 13-06-2012, 09:40

Hi Mark,

This looks perfect to what I achieve but lacks one vital thing – I need to go to the Standard ‘Out of The Box View’ for certain items and the alternative view for others. I know this is a long shot but when you have catalog items which are not ‘physical’ items the Out of The Box View does not make any sense. Even if I could skip the initial ‘servicecatalog_checkout_one.do’ and go straight to the final Order Summary?

Thanks,

Kev

Reply
Mark Stanger 13-06-2012, 10:47

I wish I had a good answer for you but I don’t. I’m sure it’s possible with some UI page hacks and maybe a custom catalog cart but it’s not something I’ve got a solution for at the moment.

Reply
Abhiram Diddigi 20-02-2013, 22:24

Hello Mark,

Where can I find how the system is navigating to com.glideapp.servicecatalog_checkout_view page?

In our instance, I don’t know how, But its navigating to a custom UI Page.

Thank you!

Abhiram Diddigi

Reply
Mark Stanger 21-02-2013, 06:44

The only place I know of is the ‘Navigation handlers’ table that I indicated above in the article. Have you checked there?

Reply
Arindam Dutta 31-01-2014, 02:57

Hi Mark,

I need two step checkout for catalog request and one step check out for wizard. How I can handle that scenario. Is there any way to achieve this without customized the SNC provided UI Page(com.glideapp.servicecatalog_cart_view) and UI Macro. Is there any way to bypass the final checkout screen from shopping Cart screen.

Reply
Mark Stanger 31-01-2014, 06:56

I haven’t looked at that much so I don’t know for sure. I don’t use wizards as a general rule because I’ve found them to be buggy in the past. You might ask on the SN community and see if anybody has dealt with this problem already.

Reply
Simon 09-04-2014, 02:12

Thanks Mark. Working great.

What would be a good option to let the users know their request has been submitted? Redirecting the users to the traditional ESS form is great but could sometime be confusing since there isn’t a true confirmation that the request has been submitted. Maybe some text on top of the ESS form or a notification popup stating “Your Request Has Been Submitted”? Can you share how to implement such a confirmation please?

Thanks.

Reply
Mark Stanger 09-04-2014, 06:33

Hey Simon, this should be pretty simple using a standard business rule and an information message that runs on insert of any record to the ‘sc_request’ table. This article may be helpful.
http://www.servicenowguru.com/scripting/ui-info-error-message-cheat-sheet/

Reply
Yvonne 10-12-2014, 12:58

Hello Mark – I would like my client to see the order summary when they complete their order but when they go to “My Request” and open the request, I would like them to get an ess view of the request. OOTB, they are getting the order status page when they click on the request number and not the ess defined fields.

Thoughts?
~Yvonne

Reply
Mark Stanger 10-12-2014, 13:19

I think that’s exactly what this solution describes. Have you configured the system as outlined in this article?

Reply
Yvonne 10-12-2014, 14:15

yes. I did configure as described and when I go order, now it takes me directly to the request page not the order summary.

Reply
Kim 06-04-2016, 12:58

This is great — I’ve got it all working except 3/4. My ess page view is named “Self Service” but it seems my end users are being directed to the default view when checking the status of a sc_request ticket. I tried creating a view called “users” and updated the UI page code, but no effect.

Reply

Leave a Reply


Latest Comments

  • David: It appears that I can hit sys_properties table with REST. This works, but I haven’t yet discovered the...
  • Mark Stanger: Hey David, It doesn’t surprise me that scoped apps have made this more difficult. I’m not...
  • David: Mark, do you have an example of how to do this in a scoped app? It seems there are many hoops to jump through...
  • Mark Stanger: The only possibility is to create a system property to override this in your application. Check out the...