Info Message not Dissapearing
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2022 07:05 PM
How should I remove the info message from the portal once I call it from the spUTIL in client script, tried many ways, the latest is at the bottom. I dont want to do it through Backend, only frontend. Is there any way to add a timer on infomessage so it goes away on the portal from the frontend, again NO BACKEND?
<div>
<!-- your widget template -->
<h1>Hello Worls</h1>
<button type="button" class="btn btn-primary" ng-click="func()">Primary</button>
</div>
api.controller=function($scope, $location, $rootScope, spUtil, $timeout, spModal) {
/* widget controller */
var c = this;
//var msg = spUtil.addInfoMessage('HEELO WORLS');
$scope.func = function(){
//c.data.action = 'boom';
//console.log('func called');
$scope.page.gs.clearMessages();
c.server.update().then(function(response){
c.server.refresh();
})
}
};
(function() {
/* populate the 'data' object */
/* e.g., data.table = $sp.getValue('table'); */
//gs.flushMessages()
//gs.addInfoMessage("Hello");
gs.flushMessages();
if(input && input.action == 'boom'){
console.log('called')
console.log("cased")
gs.flushMessages();
}
})();
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2022 10:09 PM
Hi @Coder2
Please find the link below which map help you with your issue:
Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.
Thanks
Anubhav Ritolia
ServiceNow Rising Star 2023
Thanks
Anubhav Ritolia
ServiceNow Rising Star 2023