ServicePortal - Redirect to home page after form successful submission submission?

aryandelhi
Kilo Contributor

I want to redirect/load home page if form (like incident etc..) has been submitted successfully and displayed success message?

Is it possible ?

1 ACCEPTED SOLUTION

Shahed Shah1
Tera Guru

Hi Arayn



You could modify the Client Script of the corresponding widget. For example in the "SC Catalog Item" widget you can add something like


document.location = "/sp/";


within the $scope.triggerOnSubmit function.



Though you would want to add a delay so the end user can see the successful submission message, which will get lost on the redirect.



Hope that helps


Shahid


View solution in original post

19 REPLIES 19

Sanjeev Kumar1
Kilo Sage

Hi,



See Script Include "SPEntryPage" .


and also read following.



Redirect to Service Portal after login


Service Portal Single Sign On, logins, and URL redirects


It will help you


Shahed Shah1
Tera Guru

Hi Arayn



You could modify the Client Script of the corresponding widget. For example in the "SC Catalog Item" widget you can add something like


document.location = "/sp/";


within the $scope.triggerOnSubmit function.



Though you would want to add a delay so the end user can see the successful submission message, which will get lost on the redirect.



Hope that helps


Shahid


Hi Aryan



If my answer helped you in your implementation please do mark my response as correct so others may benefit from finding this question and the answer.



Thanks


Shahid


Hi Shahid,



This was very helpful, and worked like a charm for editing the "SC Catalog Item" widget and redirecting after submit! I am wondering if you have any details on whether or not this should work the same for a new Incident form? Any insight on where that would need to be updated? Any help would be greatly appreciated!



Thanks!


Joe


Hi Joe



Sorry for not responding sooner. Just to get a clearer understanding, are your users creating an Incident via a Record Producer in the Service Portal or via a standard Incident form in the default UI (UI15/UI16)?



In terms of the Service Portal it all depends on what that widget is where the Incident form is loaded. Then identifying the client script function being called from the HTML side (could be the ng-click directive on the Submit button or the ng-submit directive on the form). Once you identify the function being called, you can place the usual Javascript redirect.



Hope this helps


Shahid