Showing results for 
Search instead for 
Did you mean: 

Flickering problem

Former Member
0 Kudos


I have done some customization on Sales Order form.

As we select customer and pressed tab key, control goes to assign a text control with some value.

Oly this assigning process fired 6 events.

2 GotFocus

2 LostFocus

2 Validate evnts with ItemUID of that control only.

Since without our addon, 23 events already fired and by assigning value to text control it goes to 31 events.It <b>increases filickering.</b>

Is ther any way to stop this.

<b>Freezing is not a sloution since if we freeze then also 31 events gets fired</b>.

Plz suggest


Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Pankaj.

Have you tried using event filtering? Have a look at the SDK code examples: <b>SAP Business One SDK\Samples\COM UI\VB.NET\08.EventsFilter</b>.

Also pay close attention to how your item events are caught. The best way for me is to first create a conditional statement that captures the event type such as a Item_Pressed event, then its beforeAction = true and afterAction = false and within those actions the itemUID:

Select Case pVal.EventType
    Case SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED
        If pVal.ItemUID = "urItmUID" Then
        End If
End Select

Hope this helps

Active Contributor
0 Kudos

Hi Pankaj,

You should check if the pval.InnerEvent = false in your events.

So only the events are processed that are a direct result of your change/tab-key.



Former Member
0 Kudos


first of all thx for ur needed reply. AD can u please explain what happened <b>if i dont use inner event check</b>. I have read UI help on innerevent but not getting confidence on this. Plz help if possible. Because this is the only check that i did not use in my coding.

Active Contributor
0 Kudos

Hi Pakanj,

If you change a field in a matrix (through code) on a system form a the lost_focus for the field that had the focus is triggered and the got_focus for the field you are changing is triggered. This is what you expect, but also some events are triggered, because of the change in the field, so the events are triggered within the initial got_focus event. If this is the case innerEvent is set to true, meaning the event was triggered within another event. You probable change fields in that event to causing another event to be triggered and so on.

By only reacting to the initial event and not to the innerEvents you skip processing a lot of unneeded events.

I hope this explanation will help you else just ask me again.