Service Portal: Add info message
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2017 06:45 PM
Hi,
Whenever user submits the incident (something is broken)we get the below mentioned info message in the incident page.The same incident when we submit in portal it showing same message.We want to override this message as want to redirect to other page in service portal .Could some please help me here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2017 12:06 AM
Hi,
Could some one please help me here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2017 11:40 AM
Hello !
I have created cloned widget of "SC Catalog Item" in which I am displaying custom message and also redirecting users to homepage (custom changes will work for only one catalog item).
Please follow below steps for custom widget changes:
1. Server script changes :
This changes should work for only one catalog item so for that I have added below condition where you need to update the sys_id of catalog item.
data.sys_id = input.sys_id;
else if(options.sys_id)
data.sys_id = options.sys_id;
else
data.sys_id = $sp.getParameter("sys_id") || $sp.getParameter('sl_sys_id');
if(data.sys_id == '186d917a6fab7980575967ddbb3ee4f2')
data.custom_catalog_item = true;
else
data.custom_catalog_item = false;
2. Add $timeout in client controller function argument.
function ($scope, $http, spUtil, nowAttachmentHandler, $rootScope, $sanitize, $window, $sce, i18n,$timeout) {
3. Update issueMessage function script with below :
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;
}
var t = $scope.m.createdMsg + " " + n + " - ";
t += $scope.m.trackMsg;
t += ' <a href="' + url + '">' + $scope.m.clickMsg + '</a>';
if(c.data.custom_catalog_item) {
spUtil.addInfoMessage("Hi! This is Custom InfoMessage created. You will be redirected to homepage in 3 seconds....");
$timeout(function(){
$window.location.href ="/sp";
},3000);
}
else
spUtil.addInfoMessage(t);
}
You need to replace "SC Catalog Item" widget with cloned widget in "sc_cat_item" page.
--
Output :
Let me know for any question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2018 10:24 AM
Does this solution work with Kingston? I can't seem to find the issuemessage function!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2018 02:22 PM
It can change the message on the Record Producer page. Is there a way to put message after the redirection?
Thank you,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2018 02:20 PM
Did you get it to work?