Strange behavior of methods.....

Hi,

I made a form (A) with a lot of functionallity on it. All work fine, untill I place a portal on another form, containing two tabs with the forms Invoices and Receipts. These two forms are not used on form A. In the methods which provide me my functionallity on form A is the following code:

forms.invoices.controller.find();
forms.invoices.invoiceid = globals.ID2_ID;
forms.invoices.controller.search( true , false );

Now strange things happen, so I added the following two lines right after the first piece of code, to see the value of which should be equal:

plugins.dialogs.showInfoDialog(‘Title’,forms.invoices.invoiceid,‘OK’);
plugins.dialogs.showInfoDialog(‘Title’,globals.ID2_ID,‘OK’);

The result of the first plugin line = 1
The result of the second plugin line = 2

Can this be explained?

As soon as I remove the tabpannel from my first form, all goes well again..

All thoughts appreciated…

Paul

Maybe one of the forms used in tabpanel has onRecordSelect setting the global to ‘2’ ?

I’ve put the plugin lines also before my Find & Search. they give the same values.

The idea is that the find & search delivers me a foundset of 1 record from the invoicetable where the InvoiceID equals the ID in my global.

I’m clueless…

BTW: Jan, I enabled the debugger and during the execution of my Find and Serach, no other method (for example: OnRecordSelect) is triggered.

Paul

try this in the invoices form:

controller.find();
invoiceid = globals.ID2_ID;
controller.search( true , false );

plugins.dialogs.showInfoDialog(‘Title’,invoiceid,‘OK’);
plugins.dialogs.showInfoDialog(‘Title’,globals.ID2_ID,‘OK’);