web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

AX - QueryService c#

(0) ShareShare
ReportReport
Posted on by 902

Hi,

I am using AX query service to get data from ax. I have created AOT query and call using query service in console application. I need to use paging to get step by step data. I am using systems custTrans table with join of other table I have added extra field in AOT query.

Code :

 AdvancedValueBasedPaging advPaging = new AdvancedValueBasedPaging();
            Paging paging = advPaging;

            advPaging.RecordLimits = new DataSourceRecordLimit[] {
                new DataSourceRecordLimit() { DataSourceName = "CustTrans", RecordLimit = 3000 }};

            do
            {
                DataSet dataSet = new DataSet();
                dataSet = client.ExecuteStaticQuery("ISPLCustomerTransactionWithDimension", ref paging);
         
                int count = dataSet.Tables[0].Rows.Count;
            }
            // Check if the returned bookmark is NULL. If so, there is no more data to be returned.
            while (((AdvancedValueBasedPaging)paging).Bookmark != null);

Error :

“An unhandled exception of type 'System.ServiceModel.FaultException`1' occurred in mscorlib.dll

 Additional information: Cannot perform Value Paging - The Table doesn't have any Primary Key or Clustered Index specified on it.” - 

Please find attached screenshot of error.

7750.Untitled.png

CustTrans table already have Primary Key or Clustered Index.

Please do needful.

Thanks,

keyur shah.

*This post is locked for comments

I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans