gs.addinfomessage() not working on portal

manmathpanda
Giga Guru

Hi Developer,

While testing portal  i was used gs.addInfomessage("text"/variable name) to debug but today if i will write this no message is showing . Could anyone please suggest this.

 

 

Regards,

Manmath

4 REPLIES 4

Alberto Consonn
ServiceNow Employee
ServiceNow Employee

Hi,

please check the following threads, it will be useful for your need:

https://hi.service-now.com/kb_view.do?sysparm_article=KB0692690

https://community.servicenow.com/community?id=community_question&sys_id=823e87eddb9cdbc01dcaf3231f96...

If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.

Thank you

Cheers
Alberto

Allen Andreas
Administrator
Administrator

Try:

spUtil.addInfoMessage("Hi!");

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Calvaresi E_
Giga Expert

Hi Manmath,

in order to use addInfoMessage() function in Service Portal, you have to add 'spUtil' in your client script function parameter:

Client Script:

function(spUtil,youOtherParameters){
  spUtil.addInfoMessage('your text');
}

Let me know if it helps.

Hi Ecalvaresi,

I am using gs.addinfomessage() in server side. Before it was working but not displaying anything .

 

 

Regards,

Manmath