cancel
Showing results for 
Search instead for 
Did you mean: 

B1 Bubble event Before action false error

former_member296240
Participant
0 Kudos

Hi ,

Am going for a addon certification .Am checking addon through Testing Tools When i use B1 Bubble Checker tool It show bubble event false in Menu click event

I searched through SDN Forum but i didn't find a solution .Kindly help me to get out of this issue .

First time Bubble event in true state

Again it change to False

Here is my Code and Error screen shot

Am using VB 2005

sap 9.0

Private Sub oApplication_MenuEvent(ByRef pVal As SAPbouiCOM.MenuEvent, ByRef BubbleEvent As Boolean) Handles oApplication.MenuEvent

        Try

            If pVal.BeforeAction = False Then

                Select Case pVal.MenuUID

               

                    Case frmRoutemasterFormID

                        If oGFun.FormExist(frmRoutemasterFormID) Then

                            oApplication.Forms.Item(frmRoutemasterFormID).Visible = True

                            oApplication.Forms.Item(frmRoutemasterFormID).Select()

                        Else

                            oRoutemaster.LoadInstruement()

                        End If

Accepted Solutions (0)

Answers (1)

Answers (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Jaba,

Whenever you click any Item or Menu in SAP Business One, pVal.BeforeAction = true is fired.

Here is what BeforeAction means:

It indicates whether the event handler method is being called before the application handles the event or after.

True: The application has not yet handled the event.

False: The application has handled the event.

So in your case it is the normal behaviour. The first time it will be BeforeAction = true always and then will change to false.

Apart from this, is there any problem that you are having because of this. Please explain.

Hope it helps.

Thanks & Regards

Ankit Chauhan

SAP Business One Global Support

former_member296240
Participant
0 Kudos

Hi Ankit ,

Thans for your reply

my screen menu ID='CITY'  first time before action = true then bubble event =true

Before action= false then i load my addon screen then bubble event =false how should i change the bubble event = false to true

edy_simon
Active Contributor
0 Kudos

Hi Jaba,

BubbleEvent only relevant during BeforeAction = true.

The purpose of BubbleEvent is a flag to let SBO know whether to process the next event.

Below is the cycle of menu click event

Before MenuClick (BeforeAction=true + By default BubbleEvent = true)

After MenuClick (BeforeAction=false)

If inside the BeforeAction event you set the BubbleEvent = true, SBO will process the After MenuClick.

If inside the BeforeAction event you set the BubbleEvent = false, SBO will NOT process after menuclick.

As you can see, there is no other event relating to menuclick after the 'After-MenuClick' event, thus BubbleEvent = true or BubbleEvent = false does not matter anymore.

Regards
Edy

former_member296240
Participant
0 Kudos

Hi Edy ,

Thanks for tour reply in Before event i set bubble event =true

but its not reflecting in b1 bubble event tool

tool still showing bubble event =False

edy_simon
Active Contributor
0 Kudos

Hi Jaba,

As I my previous post.

The BubbleEvent in BeforeEvent = False is not relevant.

Moreover, the event logger log the event before your code. Not after you set the bubbleevent value.

Hence the value in the event logger is the default value.

If you were thinking that the BubbleEvent value should persists between BeforeAction=True and BeforeAction=False, then you are wrong.

The BubbleEvent only relevant to the current event. It will not persists between events.

Regards
Edy