[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

microsoft.public.axapta.programming

How-to use Query from the AOT in code of classes

tbelliard

12/6/2005 9:49:00 AM

Hi,

I'd like to know how I can instanciate a query graphically build in the AOT
with code in my object ?

Thanks
2 Answers

Luegisdorf

12/6/2005 2:05:00 PM

0

Hi Belliard

you can do it this way:

QueryRun queryRun;
Args args = new Args();
;
args.name(querystr(AppObjectReleaseNotes));
queryRun = classfactory.queryRunClass(args);

while (queryRun.next)
{
do something ...
}

Best regards
Patrick

"tbelliard" wrote:

> Hi,
>
> I'd like to know how I can instanciate a query graphically build in the AOT
> with code in my object ?
>
> Thanks

Mike Frank

12/6/2005 5:12:00 PM

0

Or you could simply use: QueryRun queryRun = new QueryRun(querystr(AppObjectReleaseNotes));

But of course the use of the ClassFactory is the recommended way.
(DevGuide: The methods on ClassFactory must be used to instantiate forms, reports, and queries from
X++ code.)

(Sorry Patrick, I couldn't resist ;-)