The CreatorCon Call for Content is officially open! Get started here.

How to trigger notification from UI Action without generating an event

Vinod40
Tera Contributor

Hello All,

We need to trigger an notification from UI Action without event generation. In Notification the 'Send When' field is set as 'Triggered'. 

Thanks in advance for the help !!! 

find_real_file.png 

1 ACCEPTED SOLUTION

You can trigger flow action which has creates notification from UI action using Flow API which will trigger your existing notification.

 

(function() {
	
  try {
    var grIncident = new GlideRecord('incident');
    grIncident.get('57af7aec73d423002728660c4cf6a71c');

    var inputs = {};
    inputs['variable'] = grIncident;

    sn_fd.FlowAPI.startActionQuick('global.update_record_test', inputs);

  } catch (ex) {
    var message = ex.getMessage();
    gs.error(message);
    }
	
})();

 

https://docs.servicenow.com/bundle/orlando-application-development/page/app-store/dev_portal/API_ref...

 

Regards,

Sachin

View solution in original post

6 REPLIES 6

Tejal Zete
Giga Expert

Hi Vinod,

 

Event is fired means when you generate event via server side objects ( e.g business rule, script includes).

Send whenSelect under what condition the notification is sent:


Please check below for more details:-

https://docs.servicenow.com/bundle/kingston-servicenow-platform/page/administer/notification/task/t_...

https://docs.servicenow.com/bundle/kingston-servicenow-platform/page/administer/flow-designer/refere...

 

Mark it Correct/Helpful if this helps you.

Thanks and Regards,

Tejal Zete

 

Thanks, Tejal for the response. 

 

We already have a notification with 'Send When' as 'Triggered' and the notification is been triggering from a Flow (the Flow has other actions as well).

As part of my new requirement, We created the UI action button and when someone clicks the UI action button it needs to send the same notification.

I don't want to create another flow just to trigger this notification. So I am looking for some code reference to send notification from UI action itself.