EventFilters and EventFiltrer object in SAP B1 and how to filtering the event for the specific form

EventFilters and EventFilrer object in SAP B1:

In this post, I will describe you about EventFilters & EventFiltrer object in SAP B1 and how to filtering the event for the specific form of SAP B1. By default, every event is triggered by SAP Business one application. We can filter only required events on the specific form by the EventFilters collection object and EventFilter object.Therefore it enhances the performance of our application by applying only required events.So we can say that this object lets you filter events for your addon and also specify which event should apply on which form.

How to filter the event through the code:

I have made a simple class for doing this events filteration kindly go through  line by line.

 

This class will startup of the application.

using System;
namespace FilterEvents {
class SubMain {
public static void Main() {
EventFilterEx oEventsFilter = null;
oEventFilter = new EventFilterEx();
System.Windows.Forms.Application.Run();
}
}
}