Solved

Can Advanced sorting be customized on shipment screen(SO302000)?

  • 12 April 2021
  • 6 replies
  • 242 views

Userlevel 6
Badge +5

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.

icon

Best answer by Naveen Boga 12 April 2021, 10:38

View original

6 replies

Userlevel 7
Badge +17

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;

 

 

Userlevel 6
Badge +5

@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

Userlevel 7
Badge +17

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;

 

 

Userlevel 6
Badge +5

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

Userlevel 6
Badge +5

@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.

Userlevel 7
Badge +17

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

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved