cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with EventFilter

Former Member
0 Kudos

Hi all,

I don't really understand how work EventFilter. My source look like that:

Private Sub SetFilters()

Dim obj_Filters As New SAPbouiCOM.EventFilters

Dim obj_Filter As SAPbouiCOM.EventFilter

obj_Filter = obj_Filters.Add(SAPbouiCOM.BoEventTypes.et_MENU_CLICK)

obj_Filter.AddEx("EPG_Mnu_Translation")

obj_Filter = obj_Filters.Add(SAPbouiCOM.BoEventTypes.et_FORM_LOAD)

obj_Filter.AddEx("EPG_Translation")

SBO_Application.SetFilter(obj_Filters)

end sub

In that case, the menu click work but not the form load. I have tried several possibility but I don't arrive to work with menu and form.

Is someone have a explanation?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sylvie!

Did you add the correct Form-UID to the Form Load event?

an other tipp..do not add something to the Menu_Click event just keep it in this way


obj_Filter = obj_Filters.Add(SAPbouiCOM.BoEventTypes.et_MENU_CLICK)

instead of


obj_Filter = obj_Filters.Add(SAPbouiCOM.BoEventTypes.et_MENU_CLICK)
obj_Filter.AddEx("EPG_Mnu_Translation")

greetz

Matthias

Former Member
0 Kudos

I had the correct Form UID

in the next sample, the form load event work but not the menu click even if I delete the "obj_Filter.AddEx("EPG_Mnu_Translation")"

obj_Filter = obj_Filters.Add(SAPbouiCOM.BoEventTypes.et_FORM_LOAD)

obj_Filter.AddEx("EPG_Translation")

obj_Filter = obj_Filters.Add(SAPbouiCOM.BoEventTypes.et_MENU_CLICK)

If I put the "et_Menu_Click" in the first line, it doesn't work to.

If I only declare "et_Menu_Click", I can click on my menus but I lost all the event on the form.

I don't know how to solve that problem.

bruno_peyron
Active Participant
0 Kudos

> an other tipp..do not add something to the Menu_Click

> event

Unless I'm mistaken, this is needed for 2004 only.

As for the rest and my two cents, note that it's not the <b>FormUID</b> one must register, but the <b>FormTypeEx</b> (whereas it's the menu's <b>UID</b> for menu events).

Former Member
0 Kudos

sorry..of course you are right do not use the Form-UID!

Former Member
0 Kudos

Sorry, I didn't work yesterday.

Thanks a lot for your answer (not adding something at et_MenuClick and used the FormTypeEx instead of the FormUID). Now my code works.

Have a nice day.

Answers (1)

Answers (1)

Gianluigi
Product and Topic Expert
Product and Topic Expert
0 Kudos

... and BTW if you use the addon wizards for VS.NET in B1DE the filtering is

automatically managed.

The wizards are available for C# and VB.NET. You can download B1DE here on

SDN under Business One SDK Tools.