On Portal, after submitting a request, want to redirect to a page and then show the Info message
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2017 04:37 AM
- 16,960 Views

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2018 06:11 AM
Good Morning,
I've noticed that you've pasted that same response 3 times in this thread.
You didn't state where exactly to put it and I've tried to use it and it doesn't seem to be working for me.
I placed this within the Client Script (since it's a javascript setTimeout) within the $scope.triggerOnSubmit = function(){ section.
Is there another place I should be putting this?
Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2018 10:42 PM
Hi Allen Andreas,
i have tried this tread which is Re: How to get url parameter value in the Client Script Service Portal?
try this link ..
it is working fine .if it is useful .select the helpful button ..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2017 05:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2017 06:32 AM
Hi,
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.
Please mark it correct/Helpful based on Impact.
Thanks,
Rini
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2017 06:36 AM
Hello,
By using OOB features, you can redirect users to specific page but however you can't display the message which you get after submission of request.
But still, if you are looking to display message on homepage, I think, below approach can be helpful.
-> After submitting request, redirect users to portal home
-> Store message in sessionStorage show that you can display that message in homepage after redirection
-> Create custom widget for homepage to show SessionStorage data (message)
Step 1 : Create clone of "SC Catalog Item" widget and make below changes :
// include $location in function parameters in client controller :
function ($scope, $http, spUtil, nowAttachmentHandler, $rootScope, $sanitize, $window, $sce, i18n,$location) {
// Update issueMessage function in client controller with below script :
function issueMessage(n, table, sys_id) {
var page = table == 'sc_request' ? 'sc_request' : 'ticket';
if (c.options.page) {page = c.options.page;}
if (c.options.table) {table = c.options.table;}
var url = spUtil.format(c.options.url, {page: page, table: table, sys_id: sys_id});
if (c.options.auto_redirect == "true") {
$window.location.href = url;
return;
}
$window.location.href = $location["$$path"];
var t = $scope.m.createdMsg + " " + n + " - ";
t += $scope.m.trackMsg;
t += ' <a href="' + url + '">' + $scope.m.clickMsg + '</a>';
sessionStorage.request_success_msg = t;
//spUtil.addInfoMessage(t);
}
->I have added $window.location.href = $location["$$path"]; so that after submission of request users will be redirected to the current portal & sessionStorage.request_success_msg for storing data in browser's session storage.
Step 2: Create custom widget which you need to add in homepage, below is the client controller script to display message:
function (spUtil) {
/* widget controller */
var c = this;
if(sessionStorage.request_success_msg != '') {
spUtil.addInfoMessage(sessionStorage.request_success_msg);
sessionStorage.request_success_msg = '';
}
}
Please let me know if you find any question for me.