- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2020 11:39 PM
Hi All,
We have a Requirement to display a message "Awaiting user info" on the RITM ticket conversation page when the RITM is in pending state.
Please find the attached below screenshot for more detail:
Any suggestion to active this requirement will be much appreciated.
Thanks in advance
Regards,
Meghan
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2020 04:21 AM
Hi Meghana,
Please follow the below steps, your requirement will be fulfilled.
1. Create a new widget and update the below code in widget.
Code Snippet:
HTML COde:
<div class="alert alert-success" role="alert" ng-if="data.messages"><small>{{data.messages}}</small></div>
Server Side:
(function() {
data.messages;
data.sys_id=$sp.getParameter('sys_id');
var reqItem=new GlideRecord('sc_req_item');
reqItem.addQuery('sys_id',data.sys_id);
reqItem.query();
if(reqItem.next()){
if(reqItem.state=='-5'){
data.messages="Awaiting User Info";
}
else{
data.messages="Custom Message";
}//Write your condition and messages here
}
})();
Step2: After Creating New Widget, Navigate to Service Portal -> Pages -> Search for Ticket Form(Id-Ticket). Open Page in Designer and place your newly created Widget as per your convenience.
Please find the attached screenshot.
Please Mark it as Correct if it fulfills your requirement
Thanks
Vamshidhar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2020 04:21 AM
Hi Meghana,
Please follow the below steps, your requirement will be fulfilled.
1. Create a new widget and update the below code in widget.
Code Snippet:
HTML COde:
<div class="alert alert-success" role="alert" ng-if="data.messages"><small>{{data.messages}}</small></div>
Server Side:
(function() {
data.messages;
data.sys_id=$sp.getParameter('sys_id');
var reqItem=new GlideRecord('sc_req_item');
reqItem.addQuery('sys_id',data.sys_id);
reqItem.query();
if(reqItem.next()){
if(reqItem.state=='-5'){
data.messages="Awaiting User Info";
}
else{
data.messages="Custom Message";
}//Write your condition and messages here
}
})();
Step2: After Creating New Widget, Navigate to Service Portal -> Pages -> Search for Ticket Form(Id-Ticket). Open Page in Designer and place your newly created Widget as per your convenience.
Please find the attached screenshot.
Please Mark it as Correct if it fulfills your requirement
Thanks
Vamshidhar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2020 12:34 AM
Hi Meghana,
Any update on this thread.
Thanks
Vamshidhar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2020 04:25 AM
Hi
Have you tried with:
spUtil.addInfoMessage('here is my message');
in the "Client Controller" of your widget?
Let me know if that answers your question and mark my answer as correct and helpful.
BR
Dirk