Info Message on UI Page?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2020 03:18 PM
Hoping this is a relatively simple question; I couldn't find it via a precursory search in communities.
On a UI Page, how do I display an info message?
Use case:
User hits Submit button on UI page
Client Script calls GlideAJAX script include
GlideAJAX does some processing, returns a value
callback function looks like this:
ga.getXML(myCallBack);
function myCallBack(response) {
var response = response.responseXML.documentElement.getAttribute("answer");
if (response.blahblah)
gs.addInfoMessage("Record " + response.blahblah + " inserted successfully."); // doesn't work (gs is undefined)
}
- Labels:
-
Multiple Versions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2022 02:23 PM
The obvious one is alert, but there are a couple other ones that seem to work OOTB in UI pages.
this.addErrorMessage()
Unfortunately there isn't a "this.addInfoMessage()"
However, I found another workaround. Just define the glideform library yourself, and you can call it from there!
var g = new GlideForm();
g.addInfoMessage()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2022 03:59 PM
This should be the accepted answer