How to display an info message on the native app?

donipayne
Giga Contributor

Is it possible to display a message on the native app when loading a form?  I have tried using on laod scrisp with info messages; however, on the native app they do not display.

1 ACCEPTED SOLUTION

willlisac
ServiceNow Employee
ServiceNow Employee

g_form.addInfoMessage(); is supported on mobile.



Try using just that API in your script.



function onLoad() {


              g_form.addInfoMessage("test");


}


View solution in original post

4 REPLIES 4

Chuck Tomasi
Tera Patron

Are you talking about the native iOS and Android app?


That is correct. The native iOS and Android App.



I have this on load client script whenever a work order task is loaded.   However it does not display an info message for the android/ios native app.


function onLoad() {


   



  g_form.getReference('company', function(gr) {


     



  var company = g_form.getReference('company');



            if(company.u_alerts != "")


            {


            g_form.addInfoMessage(company.u_alerts);


            }


  });


   


}


willlisac
ServiceNow Employee
ServiceNow Employee

g_form.addInfoMessage(); is supported on mobile.



Try using just that API in your script.



function onLoad() {


              g_form.addInfoMessage("test");


}


shivanipatel
ServiceNow Employee
ServiceNow Employee

Doni,



We are glad you took advantage of the ServiceNow Community to learn more and to get your questions answered. The Customer Experience Team is working hard to ensure that the Community experience is most optimal for our customers.



If you feel that your question was answered, we would greatly appreciate if you could mark the appropriate thread as "Correct Answer". This allows other customers to learn from your thread and improves the ServiceNow Community experience.



If you are viewing this from the Community inbox you will not see the correct answer button.   If so, please review How to Mark Answers Correct From Inbox View.



Thanks,


Shivani Patel


Unknown-1.png