Hello, I’d like to change the sort order of scanned items the Pick Pack Ship screen on 2022R1. I have asked a similar question previously in the 'mobile development' group and was able to update the sort order on 2021R1, however, the coding of the Pick Pack Ship screen on 2022R1 has changed substantially and the method I used previously no longer works.
I’d like to reorder the ‘picked’ view, let’s say by Description.
I believe the picked view is in the PXObjects\SO\WMS\Modes\PickMode.cs file in the code CodeRepository.
The picked view and delegate are shown below, and it’s a relatively simple definition.
public class Logic : ScanExtension
{
#region Views
public SelectFrom<SOShipLineSplit>.InnerJoin<SOShipLine>.On<SOShipLineSplit.FK.ShipmentLine>.
OrderBy<
SOShipLineSplit.shipmentNbr.Asc,
SOShipLineSplit.isUnassigned.Desc,
SOShipLineSplit.lineNbr.Asc>.
View Picked;
protected virtual IEnumerable picked()
{
var delegateResult = new PXDelegateResult { IsResultSorted = true };
delegateResult.AddRange(Basis.GetSplits(Basis.RefNbr, includeUnassigned: true, s => s.PickedQty >= s.Qty));
return delegateResult;
endregion
}
My updated view will change the sort order.
public SelectFrom<SOShipLineSplit>.InnerJoin<SOShipLine>.On<SOShipLineSplit.FK.ShipmentLine>
.OrderBy<SOShipLine.tranDesc.Asc,
SOShipLineSplit.isUnassigned.Desc,
SOShipLineSplit.lineNbr.Asc
>.View Picked;
My problem is that I don’t know where to define the replacement view. I’m finding the PickPackShip+Host class difficult to navigate.
I thought I’d be able to define the view in PickPackShip.Host, as shown below, but this doesn’t work.
public class PickPackShip_Host_Extension : PXGraphExtension<PX.Objects.SO.WMS.PickPackShip.Host>
{
public SelectFrom<SOShipLineSplit>.InnerJoin<SOShipLine>.On<SOShipLineSplit.FK.ShipmentLine>
.OrderBy<
SOShipLine.tranDesc.Asc,
SOShipLineSplit.isUnassigned.Desc,
SOShipLineSplit.lineNbr.Asc
>.View Picked;
protected virtual IEnumerable picked()
{
var delegateResult = new PXDelegateResult { IsResultSorted = true };
//delegateResult.AddRange(Basis.GetSplits(Basis.RefNbr, includeUnassigned: true, s => s.PickedQty >= s.Qty));
return delegateResult;
}
The sort order doesn’t change and the delegate isn’t hit in debug mode.
Can anyone advise which class should be extended in order to make this change?
Thanks
Steve