Skip to main content

Hello,

     We have a need to sort on shipment screen in the following way:

1, fristly, sort by temperature zone, which is a customized field stands for the stocking area, like frozen area, fresh area, or dry area.
2, Then in each temp zone, sorting by Order Qty, from largest to smallest.

 

currently, as I checked, if I firstly sort by temp zone, then secondly it would sort by line nbr. ascending, like by default implicitly.

Is there a way to customize on it? 
Thanks.

Hi, @ray20    Hope you are doing well!

In the Shipments screen, document details are sorted based on the ShipmentNbr and SortOrder fields.

 

Default Acumatica Sorting order view.

public PXSelect<SOShipLine, Where<SOShipLine.shipmentNbr, Equal<Current<SOShipment.shipmentNbr>>>, OrderBy<Asc<SOShipLine.shipmentNbr, Asc<SOShipLine.sortOrder>>>> Transactions;

 

To achieve your requirement, you need to modify the below view by adding the TempZone field and verify once.

public PXSelect<SOShipLine, Where<SOShipLine.shipmentNbr, Equal<Current<SOShipment.shipmentNbr>>>, OrderBy<Asc<SOShipLine.shipmentNbr, Asc<SOShipLineExt.TempZoneField, Asc<SOShipLine.sortOrder>>>>> Transactions;

 

 


@Naveen B 
Hello, Captain, thank you for asking. I am good, just back from an annual leave.

Thank you for giving me the directions.
But my question would turn to how can I modify the view and publish it?

By the way, I need to firstly sort by tempzone and then sort by OrderQty


Hi @ray20,

Below is the View you need to have in your SOShipmentEntry Extended Graph.

Yes, as Shipment Nbr will be the same for the ShipLine records in the document, the below will works.

public PXSelect<SOShipLine, Where<SOShipLine.shipmentNbr, Equal<Current<SOShipment.shipmentNbr>>>, OrderBy<Asc<SOShipLine.shipmentNbr, Asc<SOShipLineExt.TempZoneField, Asc<SOShipLine.Qty>,Asc<SOShipLine.Sortorder>>>>> Transactions;

 

 


@Naveen B Thank you, my friend, I will try tomorrow.


@Naveen B  Hello, Captain, Mission completed. Thank you for your guidance.

 

Altought I made a little changed on your code script, but it is your solution.
here is my update:

 

 

I just put the code snipet under the soshipmententry, looking at the snapshot above.

And changed the Asc to Desc, because I’d like it to sort from largest to samllest.


@ray20 That’s wonderful. Thanks for sharing an update :) 


Reply