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.
CustTrans table already have Primary Key or Clustered Index.
Please do needful.
Thanks,
keyur shah.
*This post is locked for comments