Have you ever needed the number of rows that are returned by the executeQuery method on the datasource of a form? For example to show some progress display while you evaluate each record individually?
Not available in earlier versions of Dynamics Ax aka Axapta, but now it is:
yourdatasource_ds.numberOfRowsLoaded();
Easier then doing a select count statement, not?
(The MSDN help information (Ax 2009 SDK) is rather limited for this function.)
Greetings,
Willy.
Sunday, April 26, 2009
Subscribe to:
Post Comments (Atom)
Hi,
ReplyDeletei just try it and think you get not the number of queryrecords. Only number of cached records returned.
I use SysQuery::countTotal(My_ds.queryRun()) to get number of records.
Here you found discussion about this:
http://www.eggheadcafe.com/conversation.aspx?messageid=32657608&threadid=32657605
Best regards
Michael