我想返回按编号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
})
答案 0 :(得分:0)
根据我对GetList()的经验,我发现您无法控制GetList()调用本身中的排序。排序顺序基于所涉及实体的默认设置。例如,对“库存物料”执行GetList()可使列表按InventoryID排序。对于采购订单,它按OrdNumber排序。如果创建通用查询并指定排序顺序,则将在对该GI的GetList()调用中使用该顺序。