Hi all,
I tried the C# code below and it throws an NotSupportedException when the code hit the foreach loop.
Error message:
The type 'System.Collections.Generic.List`1[[System.Int64, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]' for the query operator is not Queryable!
// Code sample
var recIdList = new List<long> { 5637144585, 5637144599, 5637144600 };
QueryProvider provider = new AXQueryProvider(null);
var CustInvoiceJour = new QueryCollection<CustInvoiceJour>(provider);
var invoiceJours = from ij in CustInvoiceJour
where recIdList.Contains(ij.RecId)
select ij;
foreach (var invoiceJour in invoiceJours)
{
// Do something
}
Anyone knows a way to get the above to work? Or another way to implement the above?
Thanks.
*This post is locked for comments