Preventing Business Rule gs.addInfoMessage from Displaying on the Portal

Lisa Goldman
Kilo Sage

Hello,

 

We have used several gs.addInfoMessage() functions in our business rules, but we do not want these messages to appear on the portal. Can someone please provide suggestions?

 

Thank you

3 REPLIES 3

sejal1107
Tera Guru

  

Please check and Mark Helpful and Correct if it really helped you.
Thanks & Regards
Sejal Chavan

Vrushali  Kolte
Mega Sage

Hello @Lisa Goldman ,

 

You can prevent messages on portal using conditional statement like below -

 

if (gs.getSession().getClientData('glide.ui.session') !== 'Service Portal') {
    gs.addInfoMessage('Your message here');
}

 

If my answer solves your issue, please mark it as Accepted✔️ & Helpful👍!

Amit Verma
Kilo Patron
Kilo Patron

Hi @Lisa Goldman 

 

If I understood your requirement clearly, you want to restrict Info messages from all the Business Rules across the instance on the Service Portal. If yes, I don't think we have a direct solution to this available.

 

You can may be make the message available for a brief amount of time by manipulating the property "glide.service-portal.notification_timeout.seconds" or you need to go through all the BRs and either remove the info Messages or embed them under an if condition as suggested by @Vrushali Kolte 

 

Thanks and Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.