I can retrieve invoice document and invoice item list but i want to retrieve invoice item list orderby (sort by) some attribute in invoice item
How Can I Do That?
You need to add an order attribute to your retrieve criteria.
Use either addOrderAttribute() or addOrderAttributeByAscend().
The second call allows you to specify order direction while the first defaults to ascending order.
would you mind to briefly describe how to use addOrderAttribute() or addOrderAttributeByAscend() ?
because i am not found method to use with
criteria.WhereCondition.addSelectEqualTo("Customer", cust) criteria.addOrderAttributeByAscend("InvoiceNo", False) cursor = criteria.perform(...)
Will give you all invoices for a customer ordered by descending invoice number.
Log in to post a comment.
I can retrieve invoice document and invoice item list but i want to retrieve invoice item list orderby (sort by) some attribute in invoice item
How Can I Do That?
You need to add an order attribute to your retrieve criteria.
Use either addOrderAttribute() or addOrderAttributeByAscend().
The second call allows you to specify order direction while the first defaults to ascending order.
would you mind to briefly describe how to use addOrderAttribute() or addOrderAttributeByAscend() ?
because i am not found method to use with
criteria.WhereCondition.addSelectEqualTo("Customer", cust)
criteria.addOrderAttributeByAscend("InvoiceNo", False)
cursor = criteria.perform(...)
Will give you all invoices for a customer ordered by descending invoice number.