Home Analyst Portal

Redirect Service Catalog Listing to User Home Page

Andrew_ReiterAndrew_Reiter Customer IT Monkey ✭
edited October 2017 in Analyst Portal
We are using a custom home page for our end users and don't want to use the service catalog listing page.  When a user starts a request offering but cancels it, it returns them to ServiceCatalog/Listing.  Is it possible to change this behavior to take them to their home page instead?

Portal Version: 8.0.2016.7

Best Answer

Answers

  • Geoff_RossGeoff_Ross Cireson Consultant O.G.
    @Andrew_Reiter

    As far as I can tell fro my testing, the cancel button on a request offering, just takes you back to where you were before. Just like back in the browser. Can you explain more about how your custom home page works and we can probably figure this out.

    Geoff
  • Andrew_ReiterAndrew_Reiter Customer IT Monkey ✭
    Thanks for the response, Geoff.  The home page is custom HTML/js that links the user to a service offering based on which link they click.  Right now the service offering only has a single request offering, but the intention is to expand that to include many.  So, the user would initiate the request from the page ServiceCatalog/Listing#/Service/GUID.

    Andrew
  • Andrew_ReiterAndrew_Reiter Customer IT Monkey ✭
    Thanks, Tom.  We were able to use app.lib.setFormReturnUrl("/") to set the return URL back to the root of the portal, which will take the user or analyst to the appropriate home page.
  • Darryl_MunroDarryl_Munro Customer IT Monkey ✭
    @Andrew_Reiter any chance you might be able to share the code you used here to help me out with the same issue :-)
    Cheers Darryl
  • Andrew_ReiterAndrew_Reiter Customer IT Monkey ✭
    @Andrew_Reiter any chance you might be able to share the code you used here to help me out with the same issue :-)
    Cheers Darryl
    We added the following to our custom.js file.
    // Set Request Offering redirect back to the users home page
    if (document.URL.indexOf("ServiceCatalog/RequestOffering") !== -1) {
         app.lib.setFormReturnUrl("/");
         return;
         }
  • Darryl_MunroDarryl_Munro Customer IT Monkey ✭
    edited January 2018
    Did you include that in a function you were already using? Shot thanks @Andrew_Reiter very helpful and saved someone who is very new to javascript the need to pull out what little hair I have :-)
    Thanks!!!
  • Darryl_MunroDarryl_Munro Customer IT Monkey ✭
    @Andrew_Reiter you need to drop the 'return' in that code as it won't work with it like that, however I assume you may be running it from within another function.
Sign In or Register to comment.