Reputation: 311
I use ReadMultiple function to retrieve filtered data from Navision service as below.
var customers = postedInvService.ReadMultiple(filtercustomers.ToArray(), CustomerParams.bookmarkKey, -10);
This works fine. But my requirement is to first sort from a specific column and get the records. How to give the specific column in order to sort records?
Upvotes: 0
Views: 1377
Reputation: 162
There three different approaches to solve that problem.
With the SOAP Web Service and setSize = 0
you get the entire set of results. You can sort the result with LINQ. E. g.
var result = from serviceInvoice in
postedInvService.ReadMultiple(filtercustomers.ToArray(), null, 0)
orderby serviceInvoice.No
select serviceInvoice;
In the Dynamics NAV Development Environment it is also possible to create a new Page have Fields and Sorting (Property SourceTableView) how it is supposed to be.
Since Dynamics NAV 2013 Pages can also be fetchef from the OData Web Service which support server side sorting and filtering. E.g. http://localhost:7048/DynamicsNAV90/OData/Company('CRONUS%20International%20Ltd.')/postedInvService?$orderby=PostingDate
Upvotes: 0