Vasanth Arivali's Blog

Using AOT Query Object in X++ Code

Posted on: March 17, 2011

Hi,

Here i posted the code to use the AOT Query Object in our X++ code.

Steps:

1) Create a AOT Query Object as your requirement.

2) Create a Job and paste the below code to check the Query Object.

static void ExecuteAOTQuery(Args _args)

{

QueryRun queryRun;

Counter totalRecords;

;

queryRun = new QueryRun(queryStr(CreatedAOTQueryName));

if (queryRun.prompt())

{

while (queryRun.next())

{

totalRecords++;

}

}

info(strFmt(“Total Records : %1”, totalRecords));

}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Welcome

What’s happening?

Error: Twitter did not respond. Please wait a few minutes and refresh this page.

Categories

Join 13 other followers

%d bloggers like this: