我想返回一个按编号、desc排序的前20个采购订单列表。这看起来应该比我找到的要容易。下面是获取前100条记录的代码示例(尽管我不清楚它可能使用的排序顺序)
Dim orders = soapClient.GetList(New PurchaseOrder With {
.OrderNbr = New StringReturn(),
.[Date] = New DateTimeSearch With {.Condition = DateTimeCondition.IsGreaterThan, .Value = "11/20/2018"},
.RowNumber = New LongSearch With {.Condition = LongCondition.IsLessThan, .Value = 100},
.VendorID = New StringSearch With {.Condition = StringCondition.Equal, .Value = "V1002"},
.Status = New StringSearch With {.Condition = StringCondition.Equal, .Value = "OPEN"},
.ReturnBehavior = ReturnBehavior.OnlySpecified
})发布于 2019-07-23 00:41:00
根据我使用GetList()的经验,我发现无法在GetList()调用本身中控制排序。排序顺序基于所涉及实体的默认值。例如,对库存项目执行GetList()会导致按InventoryID对列表进行排序。而对于采购订单,则按OrdNumber排序。如果您创建了一个通用查询并指定了一个排序顺序,那么它将在您对该GI的GetList()调用中使用。
https://stackoverflow.com/questions/57044780
复制相似问题