Page 1 of 1

Serial selection dialog. Different ordering

PostPosted: Thu Dec 02, 2021 10:39 am
by DannyC
Pretty sure the current serial selection dialog is sorted by DateIn by default.

Is it possible to sort by other fields, ideally Expiry Date?
But I can see possibilities for BinLocationDesc, Quantityleft, LCostIn.

How could we do this?

Re: Serial selection dialog. Different ordering  Topic is solved

PostPosted: Wed Jan 19, 2022 3:51 pm
by Mike.Sheen
The serial selection dialog has a property, SerialDisplaySortOrder.

The type of that property is an enumeration:

Code: Select all
Public Enum SerialDisplaySortOrders
    e_SerialSortOrderDateIn = 0
    e_SerialSortOrderSerialNo = 1
    e_SerialSortOrderExpiryDate = 2
End Enum


Places where that dialog is displayed will set that property based on their own relevant system settings.

For example, Sales Order Entry has a property "SerialDisplaySortOrder" - it sets the serial dialogs "SerialDisplaySortOrder" to be that value.

So in sales orders, you can override the order to be Expiry order simply by:

Code: Select all
SalesOrder.SystemSettings.SerialDisplaySortOrder = e_SalesOrderSerialSortOrderExpiryDate


Or you can get the customer to change their "SerialDisplaySortOrder" on the Invoicing tab of System Configuration - this will achieve the same thing.