value can not be null parameter name key

  • 30 April 2023
  • 2 replies

Userlevel 3


I create a new data field into my purchase order screen poline DAC,


Then I try to set field value in rowselected event.

 public class POOrderEntry_Extension : PXGraphExtension<PX.Objects.PO.POOrderEntry>
    #region Event Handlers

    protected void POLine_RowSelected(PXCache cache, PXRowSelectedEventArgs e)
      var row = (POLine)e.Row;
      POLineExt poLine = PXCache<POLine>.
      poLine.Usruomnew= "news";
     if(poLine != null){
       poLine.Usruomnew= "new";




After adding POOrderEntry_Extension and published It shows an error below like that.

Can you please give solution for that.


Best answer by Naveen Boga 1 May 2023, 05:42

View original

2 replies

Userlevel 7
Badge +17

Hi @jeewanishalika20  It is NOT recommended to assign the value in the Row_Selected event.

Please move it a proper event.

In the above code, there are no NULL checks hence you're getting this issue. I have modified your code and below is the working code.


    public class POOrderEntry_Extension : PXGraphExtension<PX.Objects.PO.POOrderEntry>
protected void POLine_RowSelected(PXCache cache, PXRowSelectedEventArgs e)
var row = (POLine)e.Row;
if (row != null)
POLineExt rowExt = row.GetExtension<POLineExt>();
if (rowExt != null)
rowExt.Usruomnew = "news";


Userlevel 3

Hi @naveen,


Thanks it’s working.



About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved