- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-08-2016 05:00 AM
Where I can configure infomessage on portal, for example when new HR case is created, there are two infomessages, I need to change them little bit (trim surname and change link) but I have no idea where I could find them.
Solved! Go to Solution.
- Labels:
-
Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-09-2016 07:04 AM
Hi Jan,
You can edit the "Created..." message by editing a Widget. The Widget you are seeking is called SC Catalog Item (widget-sc-cat-item). Clone that widget to begin making your changes.
The logic for generating the messages exists in the Client Script.
Edit the function at the bottom of the Client Script, called issueMessage(). This is what is called after the form has been submitted, and the order has been processed.
function issueMessage(n, table, sys_id) {
var page = table == 'sc_request' ? 'sc_request' : 'ticket';
var t = "${Created} " + n + " - ";
t += "${track using 'Requests' in the header or}";
t += ' <a href="?id=' + page + '&table=' + table + '&sys_id=' + sys_id + '">' + "${click here to view}" + '</a>';
spUtil.addInfoMessage(t);
}
Once you have made the changes, simply replace the OOB Widget Instance that appears on the page "sc_cat_item", with your newly cloned one.
If you want to see where issueMessage() gets called, take a peek at the getOne() function for its use.
I am unsure where the "assigned to" message gets called from, but it is not in the Widget from what I can tell.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2017 06:48 PM
Hi Adrish,
Are you wanting the message to be displayed for longer or redirect to the submitted form?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2017 10:07 PM
Hi Matthew,
My requirement is the message to be displayed for longer time. It is working displaying longer sometimes but sometimes it disappears quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2017 11:45 PM
I want that message to stay for some more time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-01-2019 02:17 AM
Hi Paul,
Now that we are in Madrid, the above script has been completely redone.
I can see the getOne() function, but the issueMessage() function has been replaced with some functions. I used the OOTB widget, but could not get the inoMessage when I submitted any request.
Could you help?
THanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2016 05:31 PM
Hi Jan,
Have a look at the page (in designer/page editor) where the request is on and take a look at what widget it uses.
Now open the widget and take a look in the Client Controller code for something along the lines of:
function issueMessage(n, table, sys_id) {
var page = table == 'sc_request' ? 'sc_request' : 'ticket';
var t = "${Created} " + n + " - ";
t += "${track using 'Requests' in the header or}";
t += ' <a href="?id=' + page + '&table=' + table + '&sys_id=' + sys_id + '">' + "${click here to view}" + '</a>';
spUtil.addInfoMessage(t);
}
This section of code generates the message that appears after you submit the request/order....
You will need to clone the OOB widget before you can edit it.
Let me know if you need some further help.
Cheers,
Matt