[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.axapta.programming

Problem using method findRecord in Go To Maintable

mortenm

10/20/2005 12:49:00 PM

I have made a copy of the form CustTable called MyCustTable. In some forms I
want to start MyCustTable when the user selects Go To Maintable from a
customer account field. The code I use is this:

static void goToMainTable(CustTable custTable)
{
Args args;
FormRun formRun;
;

args = new Args(formstr(MyCustTable));

formRun = ClassFactory.formRunClass(args);
formRun.init();
formRun.run();
formRun.dataSource().findRecord(custTable);
formRun.detach();
}

The problem is the call to findRecord. With a small dataset everything works
just fine. But with a large dataset the findRecord call migth last for as
long as 10-20 seconds. Of coruse this is a problem for our users.

If we try Go To Maintable in a standard form like SalesTable and the
standard form CustTable is started everything works like it is supposed to.
All customers are shown with focus on the correct customer, and it will only
take a fraction of a second.

What can I do in my goToMainTable to make it work like the standard routine?

Best regards,
Morten