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.
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…
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:
<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.
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
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.
<a class="linked" id="permalink" target="_top" href="nav_to.do?uri=$[permalink]">$[sc_request.number]</a>.
<br /> ${gs.getMessage('bookmark_link_help_note')}
Thanks Mark,
It’s working, as always
Cheers
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
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.
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
The only place I know of is the ‘Navigation handlers’ table that I indicated above in the article. Have you checked there?
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.
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.
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.
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.
https://servicenowguru.wpengine.com/scripting/ui-info-error-message-cheat-sheet/
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
I think that’s exactly what this solution describes. Have you configured the system as outlined in this article?
yes. I did configure as described and when I go order, now it takes me directly to the request page not the order summary.
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.
How about redirecting them to the RITM record that is associated? I understand that many people use them as a one to many, our Request & Request Items are always a 1:1 (we just Catalog Tasks and Variables for our needs)
Good idea! I just updated the script above to do this. I also made it smart enough to detect whether or not there is only one item in the request. If there is only one it goes to the item view, if there are more it goes to the request view. Give it a test and let me know how it works!
This works perfectly! Thank you!