- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2023 07:58 AM
Hi,
I am trying to do a simple UI Action, visible in Lists, running on the Client Side, that displays a simple message.
I tried it on the Task table, and any extended table, like Incident, and it worked perfectly. (See image below)
When I put the UI Action on a custom table I created, I get the message "Uncaught ReferenceError: addFormMessage is not defined".
I also tried using g_form functions, and still get an error saying g_form is not defined.
Is there an attribute on a configuration we need to put on our custom tables to have access to these functions ?
Thanks !
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2023 11:02 AM
Seems like something is missing on your custom table/app. Absent finding that, try defining g_form before using it:
var g_form=new GlideForm();
g_form.addInfoMessage('Test');

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2023 08:52 AM
Hi @Pascal P,
Uncheck cliënt checkbox and use gs.addInfoMessage('text') instead.
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2023 10:37 AM
Thanks for the answer but I really need it to be Client-side. I wanted to simplify the situation by omitting details, but my UI Action also does other things, like opening a UI Page and asking user's input. As I said, It worked on the Tasks tables... so I know it is possible. I just don't know how.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2023 11:59 AM
You can try these bellow codes, and modify them as per your need:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2023 11:02 AM
Seems like something is missing on your custom table/app. Absent finding that, try defining g_form before using it:
var g_form=new GlideForm();
g_form.addInfoMessage('Test');