cancel
Showing results for 
Search instead for 
Did you mean: 

Event handling question

Former Member
0 Kudos

Hey All,

Can someone explain to me what the InnerEvent property is and when I should use it?

I handle validate and item click events on my forms should I check this innerevent property?

What is it normally used for?

Accepted Solutions (1)

Accepted Solutions (1)

AdKerremans
Active Contributor
0 Kudos

Hi Curtis,

InnerEvent is true, when the event is fired from within another event. Meaning that if you change a field on a form and through that change by example a validate is fired, the validate event has the innerEvent set to true.

In normal cases you should also check that inneEvent = false and only thant process yourcode,

Regards

Ad

Former Member
0 Kudos

Thanks Ad.

I have never really understood why this happened sometimes. Especially with the validate event. It makes a lot more sense now.

So would the general rule be to always ignore the innerevents unless you need them for something specific?

Former Member
0 Kudos

You should searching in sdk Help for clearing...

You may something like that (example in pseudoCode):

InnerEvent function()
begin

if pval.beforeaction =true  then
 select case pval.itemuid 
     case 'txtA':
             if pval.innerevent = false then 
                     *'note: innerEvent= false means a directed action of end user*                        
                      update information in txtB (for example..)
             end if 
     case 'txtB':
           if pval.innerevent =true then
                *'note: innerEvent=true means an action not directed caused by end user* 
                 ... do something
           end if

 endselect
else

endif

end

I hope help you

Kinds Regards

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Curtis,

InnerEvent means whether the event is fired by B1 or by user. For example, in B1, there is a mechanism that all the action will go through menu, say you click "Sales Order" in MainMenu form, but actually B1 will fire a menu click event which will open Sales Order form. So that menu click event is indicated as InnerEvent = true.

In your Add-on coding, sometimes inner event might cause problem (from pass experience), so you could filter inner event by this property.

Hope this helps,

Nick He

Former Member
0 Kudos

Thanks a lot for the postings guys.

Eneveux
Product and Topic Expert
Product and Topic Expert
0 Kudos

Curtis,

In the 2005A SDK Help Center if you lookup "MenuEvent Object", there is an explanation and a sample piece of code.

HTH,

Eddy