S

erviceNow’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.

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…?

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 ServiceNow 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 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’ (‘com_glideapp.servicecatalog_checkout_view_v2’ for newer instances) UI page under ‘System UI -> UI pages’ and change the name to ‘com.glideapp.servicecatalog_checkout_view-OLD’ (‘com_glideapp.servicecatalog_checkout_view_v2-OLD’ for newer instances)

4Create a new UI page with the following settings…

UI page
Name: ‘com.glideapp.servicecatalog_checkout_view’ (‘com_glideapp.servicecatalog_checkout_view_v2’ for newer instances)
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 if there is more than one item in the request and to the ‘ess’ view for the ‘sc_req_item’ table if there is only a single item in the request.
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'>
    <g2:evaluate jelly="true">
        var item_id = '${sysparm_sys_id}';
        var item_table = 'sc_request';
                                                   
        var sc_req_item = new GlideRecordSecure('sc_req_item');
        sc_req_item.addQuery('request', '${sysparm_sys_id}');
        sc_req_item.query();
        if(sc_req_item.getRowCount() == 1){
            sc_req_item.next();
            item_table = 'sc_req_item';
            item_id = sc_req_item.sys_id;
        }
    </g2:evaluate>
    <script language='javascript'>
        addLoadEvent(overrideView);
        function overrideView() {    
            var url = '$[item_table]' + '.do?sys_id=' + '$[item_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.