Skip to content

Instantly share code, notes, and snippets.

@jbutz
Last active August 29, 2015 13:55
Show Gist options
  • Save jbutz/8743060 to your computer and use it in GitHub Desktop.
Save jbutz/8743060 to your computer and use it in GitHub Desktop.
ServiceNow - Navigation Handlers
var view = g_request.getParameter('sysparm_view');
if (!view && ! gs.getUser().hasRoles())
view = 'ess';
if (view == 'ess' || view == 'checkout') {
var checkOutForm = gs.getProperty('glide.sc.checkout.form', 'com.glideapp.servicecatalog_checkout_view');
if (checkOutForm == 'com.glideapp.servicecatalog_checkout_view') {
var realID = g_uri.get('sys_id');
g_uri.set('sysparm_sys_id', realID);
answer = g_uri.toString('com.glideapp.servicecatalog_checkout_view.do');
}
}
answer;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment