I am trying to change the default sort order of the details on Approve Bills for Payment. I’ve read these articles:
- acumatica - How to use OrderBy in a data view delegate - Stack Overflow
- acumatica - OrderBy in PXProjection Select does not work - Stack Overflow
The APApproveBills graph has a data view and a data view delegate, but according to the above articles, it seems like the following code should achieve what I need:
namespace PX.Objects.AP
{
public class APApproveBills_Extension : PXGraphExtension<PX.Objects.AP.APApproveBills>
{
public override void Initialize()
{
Base.APDocumentList.OrderByNew<OrderBy<Vendor.acctName.Asc>>();
}
}
}
This does change the sort, but the result is not what I am expecting.
Can someone explain why this is happening and/or how to fix it?