If I want to add new DB fields on this screen, which table they will be added I know its ScanHeader DACExtension but I am not able to find the respective table. I need to add details like on which day this shipment was scanned it was scanned by whom and data like that.
Solved
Pick Pack and Ship Screen
Best answer by Naveen Boga
Hi
Please do modify your code accordingly and verify.
protected void ScanHeader_Barcode_FieldUpdated(PXCache cache, PXFieldUpdatedEventArgs e)
{
PXCache<SOShipment> shipmentTemp = new PXCache<SOShipment>(Base);
IEnumerable<SOShipmentEntry> temp = cache.Cached.Cast<SOShipmentEntry>();
ScanHeader row = (ScanHeader)e.Row;
HeaderExt headerExt = row.GetExtension<HeaderExt>();
PickPackShip.Host graph = PXGraph.CreateInstance<PickPackShip.Host>();
switch (row.ScanState)
{
case "ITEM":
headerExt.ScanningStatus = "Partial";
break;
case "NONE":
headerExt.ScanningStatus = "Completed";
break;
default:
break;
}
SOShipment shipment = (from p in graph.Select<SOShipment>()
where
p.ShipmentNbr == row.Barcode
select p).FirstOrDefault();
if (shipment != null)
{
SOShipmentEntry shipGraph = PXGraph.CreateInstance<SOShipmentEntry>();
SOShipmentExt shipmentExt = shipment.GetExtension<SOShipmentExt>();
//cache.SetValueExt<SOShipmentExt.usrScanner>(shipment, headerExt.Scanner);
//cache.SetValueExt<SOShipmentExt.usrScannerName>(shipment, headerExt.ScannerName);
shipGraph.Document.Cache.SetValueExt<SOShipmentExt.usrPicker>(shipment, headerExt.UsrPicker);
cache.SetValueExt<SOShipmentExt.usrPickerName>(shipment, headerExt.UsrPickerName);
shipGraph.Document.Update(shipment);
shipGraph.Save.Press();
}
}
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.