Skip to main content
Solved

Upload button in Shipment Details grid

  • 20 September 2023
  • 8 replies
  • 227 views

Forum|alt.badge.img+1

Hi,

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.
         

Best answer by Naveen Boga

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:

  1. Consider using an import scenario instead of investing additional effort in coding.
  2. Enable the Key fields, which should resolve the issue with the File Upload feature in 23 R1.
  3. 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.

 

View original
Did this topic help you find an answer to your question?

8 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3381 replies
  • September 20, 2023

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


Forum|alt.badge.img+1
  • Author
  • Pro I
  • 59 replies
  • September 20, 2023

@Naveen Boga I gave Header DAC in PXImport 

But Its not updating values(Descr,Ship Qty) from 2nd Line.


Vignesh Ponnusamy
Acumatica Moderator
Forum|alt.badge.img+5

@girik06,

Do you have the Add Row(+ symbol) enabled in the Shipments Details grid? Are you using 23R1?


Forum|alt.badge.img+1
  • Author
  • Pro I
  • 59 replies
  • September 21, 2023

@Vignesh Ponnusamy 

Add row disabled and using 22R1.


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3381 replies
  • Answer
  • September 21, 2023

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:

  1. Consider using an import scenario instead of investing additional effort in coding.
  2. Enable the Key fields, which should resolve the issue with the File Upload feature in 23 R1.
  3. 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.

 


Forum|alt.badge.img+1
  • Author
  • Pro I
  • 59 replies
  • September 26, 2023

Hi @Naveen Boga 

Base Upload Button didn’t work. So created new custom upload button to update the values from excel..
Values are Updating.


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3381 replies
  • September 26, 2023

@girik06  Awesome !! Thanks a lot for sharing the update.


Sagar Greytrix
Captain II
Forum|alt.badge.img+3

@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;
        }


Any help with this would be greatly appreciated.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings