How to pass data into processing method with help of lambda expression
today I want to leave a short note on how to pass some additional parameters into Processing method of processing page with help of lambda expression. Syntax is pretty simple:
public class SSShipmentDateResetter : PXGraph<SSShipmentDateResetter>
public PXFilter<ShipmentFilter> ShipmentFilter;
public PXFilteredProcessing<SOShipment, ShipmentFilter> ShipmentsForProcessing;
var shipmentFilter = ShipmentFilter.Current;
public static void ResetDate(ShipmentFilter filter, List<SOShipment> shipments)
for me such approach is a bit easier to use as it involes a bit less amout of typing.
If you want to have even simpler syntax, then following sample also may work for you:
var filter = ShipmentFilter.Current;
ShipmentsForProcessing.SetProcessDelegate(shipments => ResetDate(filter, shipments));
For simplicity sake, I've showed only constructor.