Calling Feedback Message From Javascript


How do I call Feedback Message from my script? I would like to use a feedback message in Outsystems instead of an alert box to be consistent and to have Outsystems uniformity.


Instead of doing:

alert("Hello World");

I would do it something like this instead:

osjs.feedbackMessage("Hello World");

Hi Gino,

I think there's no official supported way of using the OsNotifyWidget by javascript (to send a feedback message), meaning that we can at anytime change its usage and behavior and consequently break your application.



I think you can use the fake notify widget from RichWidgets to send your message throught the notify (see the widget description to learn how to use), and on the FakeOnNotify screen action, get your message with the NotifyWidgetGetMessage and display the feedback.

 If there's no official supported way of using the OsNotifyWidget by javascript, is it safe to use the fake notify widget? 
Hi Gino,

Just published a component to do that, using the approach mentioned by Bruno.
Here is the link

It uses the FakeNotifyWidget, it it does one extra server round-trip for that.

To Bruno, well It's safer than just using it directly a Notify to the Feedback block. If in the future the OsNotify is broken at least the FakeNotifyWidget will have to include an upgrade or compatibility path to keep things working.

João Rosado
Hi Bruno,

Yes it is safe to send a message through the OsNotifyWidget by javascript. This might be the best solution for this issue, because you are calling an action on the module.

@Gino take a look on João Rosado component :) it has all you need

I've changed the previous message to enforce that it is not supported to send a feedback message directly (which is the issue here) without calling an action on the server. But it is possible... but it isn't a very pretty solution. I do not recomend it.

You would have to pass the feedback widget id and the message Type Id concatenated in the message...

.. and btw thanks João. :)

Thanks guys appreciate it :)
Hi Gino,

Someone just noticed that my component had the wrong eSpace uploaded.
Just fixed it, so if you downloaded already please download the new version.

João Rosado


I'm still a little stuck.

I have a Fake Notify Widget called FakeNotifyRefresh 

This goes to the OnNotifyAction where it adds a random number to a list and calls a statistic web service (which works when I click a button going to this action).

However, I'm not sure where I place these JavaScript functions.

"setInterval(function(){ refreshNotifications() }, 1000);


function refreshNotifications() {

    OsNotifyWidget('" + FakeNotifyRefresh.Id + "','')


Do they go in the javascript of the page?

Or does it goes in the preparation so this is run every second when the page first loads?