Skip to main content
Question

new 26R1 error: A PXGraphExtension instance has been passed as a query parameter to the Select method

  • June 19, 2026
  • 4 replies
  • 13 views

Forum|alt.badge.img+2

After upgrading to 26R1, I’m now getting this new Exception (didn’t happen in 24R1):

"A PXGraphExtension instance has been passed as a query parameter to the Select method."

This happens on a Select using the POLine object:

 public class POMaintExtension : PXGraphExtension<POOrderEntry>
    {

        public SelectFrom<POLine>
              .Where<POLine.orderNbr.IsEqual<
             POOrder.orderNbr.FromCurrent>>
            .View POLineView;

        private void DeviceHubPrint()
        {
            foreach (object objPOL in POLineView.SelectMain(this)) //throw Exception

...

Question: did something change with POLine causing this new behavior?

4 replies

Samvel Petrosov
Jr Varsity III
Forum|alt.badge.img+9

Try replacing 
 

foreach (object objPOL in POLineView.SelectMain(this))

with

foreach (object objPOL in POLineView.SelectMain(this.Base))

there might be mulptiple .Base options like .Base1, .Base2 if this is an extension of graph with other extensions. You want to make sure that you are passing the one that actually is the PXGraph (POOrderEntry, SOOrderEntry, etc.) and not PXGraphExtension.


Forum|alt.badge.img+1
  • Semi-Pro III
  • June 19, 2026

try replacing with this 
POLineView.SelectMain(Base)


Forum|alt.badge.img+2
  • Author
  • Semi-Pro III
  • June 22, 2026

Try replacing 
 

foreach (object objPOL in POLineView.SelectMain(this))

with

foreach (object objPOL in POLineView.SelectMain(this.Base))

there might be mulptiple .Base options like .Base1, .Base2 if this is an extension of graph with other extensions. You want to make sure that you are passing the one that actually is the PXGraph (POOrderEntry, SOOrderEntry, etc.) and not PXGraphExtension.

I tried but I get the same error and there aren’t multiple Base options.  The Base has always been PXGraphExtension (see code in original post).  It worked in 24R1.  So I can no longer create an extension off PXGraphExtension in 26R1?


Forum|alt.badge.img+3
  • Pro III
  • June 23, 2026

@bpgraves 

I tested the code by calling POLineView.SelectMain() without passing any parameter, and it works with no error.

As shown in the screenshot,

PXSelectBase<POLine>.SelectMain(params object[] arguments)

This indicates that the method accepts optional arguments (params object[]), so it can be called without passing this or Base.
Can you chekc this?