In shipments screen Details Grid, I added Upload button and trying to update Existing data through Excel, It updating for only first line. Not updating for remaining lines.
Below is the Code I gave
In Aspx: AllowUpload=true for details grid
In Graph Extension: [PXImport(typeof(SOShipLine))] Â Â Â Â Â Â PXViewName(Messages.SOShipLine)] Â Â Â Â Â public PXSelect<SOShipLine, Where<SOShipLine.shipmentNbr, Equal<Current<SOShipment.shipmentNbr>>>, OrderBy<Asc<SOShipLine.shipmentNbr, Asc<SOShipLine.sortOrder>>>> Transactions;
Can anyone suggest on this to update all lines in grid. Â Â Â Â Â Â Â
Page 1 / 1
@girik06Â Please use the Header DAC in PXImport
>PXImport(typeof(SOShipment))] Â Â Â Â Â Â ÂPXViewName(Messages.SOShipLine)] Â Â Â Â Â public PXSelect<SOShipLine, Where<SOShipLine.shipmentNbr, Equal<Current<SOShipment.shipmentNbr>>>, OrderBy<Asc<SOShipLine.shipmentNbr, Asc<SOShipLine.sortOrder>>>> Transactions;
@Naveen Boga I gave Header DAC in PXImportÂ
But Its not updating values(Descr,Ship Qty) from 2nd Line.
@girik06,
Do you have the Add Row(+ symbol) enabled in the Shipments Details grid? Are you using 23R1?
@Vignesh PonnusamyÂ
Add row disabled and using 22R1.
Hi @girik06Â
I can able to enable the 'Add Row' button in the Details section, but I've noticed that when I upload a file, it doesn't update the records. The issue appears to be that the uploaded file is not displaying the KEY fields, causing the system to be unaware of how to update the records, since those fields are disabled at line level
From my perspective, here are the available options:
Consider using an import scenario instead of investing additional effort in coding.
Enable the Key fields, which should resolve the issue with the File Upload feature in 23 R1.
Explore the possibility of creating a custom File Uploader specifically designed to handle Excel files, ensuring that it can both upload the file and update the associated records."
screenshot for reference.
Â
Hi @Naveen BogaÂ
Base Upload Button didn’t work. So created new custom upload button to update the values from excel.. Values are Updating.
@girik06Â Awesome !! Thanks a lot for sharing the update.
​@Naveen BogaÂ
I just want to know if it is possible to enable the Add Row button on the Shipment screen in 24R1.
If yes, could you please share the steps to achieve this?
I tried using the RowSelected event and adding the InitNewRow mode for the grid, but nothing worked. Â
protected void SOShipment_RowSelected(PXCache cache, PXRowSelectedEventArgs e, PXRowSelected InvokeBaseHandler) { if (InvokeBaseHandler != null) InvokeBaseHandler(cache, e); var row = (SOShipment)e.Row; Base.Transactions.AllowInsert = true; }