How to debug event-based notifications

Event based notifications are triggered by the system, but the script debugger is not.

There is a Schedule job running every 30 seconds that processes the events and generates the Notifications.

But this will not trigger the Script Debugger as it is run by system.

So, what can you do if you want to debug an Email Script in one of your event based notifications?

You need the notifications to be generated with your own user.

To achieve that, you can run a Background Script and trigger the event processing, before the Schedule job is triggered automatically.

Steps

  1. Add a breakpoint in your Email Script
  2. Open the Script Debugger
  3. Perform the action that triggers the event
  4. Run this line of code in the Background Script (before it is processed by the Scheduled Job).
gs.eventsProcess();Code language: CSS (css)