Skip to main content
Solved

Using IsInSubSelect, Getting error: BQL verification failed: Select`2 SOOrder

  • 9 November 2023
  • 5 replies
  • 98 views

Hello,

Please ignore my previous post where I thought this was solved.  It’s not solved, and is still an issue.

 

I have a screen that has a single View where I need to use the IsInSubSelect.  I’ve reduced my query down to the absolute basics.  When the page loads, the query results are rendered as expected, but if you click the grid’s refresh icon, you get a BQL validation error (full error below).

Here is the query, reduced to about as simple as I can possibly make it - where it selects SOOrders from a list of order numbers:

public SelectFrom<SOOrder>
.Where<SOOrder.orderNbr.IsInSubselect<
SelectFrom<SOOrder>
.InnerJoin<SOLine>.On<SOLine.orderType.IsEqual<SOOrder.orderType>
.And<SOLine.orderNbr.IsEqual<SOOrder.orderNbr>>>
.SearchFor<SOOrder.orderNbr>>>
.View Orders;

As mentioned, when the screen is first loaded, the query runs as expected.  If you select a couple rows, or click something like the grid refresh button, you get this error:

BQL verification failed: Select`2
SOOrder
Where`1
Where`2
orderNbr
In2`1
SearchFor`1
SelectFromBase`2
SOOrder
Append`2
IFbqlJoin
Empty
IFbqlJoin
On`1
SOLine
Where2`2
Compare`2
orderType
Equal`1
orderType
And`1
Compare`2
orderNbr
Equal`1
orderNbr
SOOrder
orderNbr

Stack Trace for this error:

at PX.Data.PXFirstChanceExceptionLogger.ProfilerFirstChanceException(Object o, FirstChanceExceptionEventArgs args)
at PX.Data.BqlCommand.Meet(PXCache cache, Object item, Objectt] parameters)
at PX.Data.PXView.MergeCache(List`1 list, Objecti] parameters, Boolean filterExists, Boolean& sortReq)
at PX.Data.PXView.Select(Objectl] currents, Objectn] parameters, Objecte] searches, Stringh] sortcolumns, Booleann] descendings, PXFilterRowP] filters, Int32& startRow, Int32 maximumRows, Int32& totalRows, Stringo] sortAsImplicitColumns)
at PX.Data.PXView.Select(Objectl] currents, Objectn] parameters, Objecte] searches, Stringh] sortcolumns, Booleann] descendings, PXFilterRowP] filters, Int32& startRow, Int32 maximumRows, Int32& totalRows)
at PX.Data.PXGraph.ExecuteSelect(String viewName, Objecta] currents, Objectn] parameters, Objecte] searches, Stringh] sortcolumns, Booleann] descendings, PXFilterRowP] filters, Int32& startRow, Int32 maximumRows, Int32& totalRows, Boolean shouldReadArchived)
at PX.Data.PXGraph.ExecuteSelect(String viewName, Objecta] parameters, Objecte] searches, Stringh] sortcolumns, Booleann] descendings, PXFilterRowP] filters, Int32& startRow, Int32 maximumRows, Int32& totalRows)
at PX.Web.UI.PXBaseDataSource.ExecuteSelect(String viewName, DataSourceSelectArguments arguments, PXDSSelectArguments pxarguments)
at PX.Web.UI.PXDataSource.ExecuteSelect(String viewName, DataSourceSelectArguments arguments, PXDSSelectArguments pxarguments)
at PX.Web.UI.PXDataSourceView.Select(DataSourceSelectArguments arguments, PXDSSelectArguments swarguments, DataSourceViewSelectCallback callback)
at PX.Web.UI.PXGrid.PerformSelect()
at PX.Web.UI.PXGrid.GetCallbackResult(PXCallbackCommand cmd)
at PX.Web.UI.PXCallbackManager.RenderControlsData(PXCallbackResultMethod resultMethod, XmlWriter writer)
at PX.Web.UI.PXCallbackManager.GetCallbackResultInternal(PXCallbackResultMethod resultMethod)
at PX.Web.UI.PXCallbackManager.GetCallbackResult(PXCallbackResultMethod resultMethod)
at System.Web.UI.Page.RenderCallback()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)


I was having the same issue where if you would select multiple rows, you would get the error, but I was able to clear that up by removing the SyncLastPosition = “true” from my grid.  Now, selecting multiple rows works, but clicking refresh on the grid’s icon causes the error.


Since one part of the error was cleared up by the grid’s settings, here’s is the layout of the screen. Maybe I am overlooking something?  Note that even through there are filters, none of them are applied to the View used by the grid.

 

<%@ Page Language="C#" MasterPageFile="~/MasterPages/FormDetail.master" AutoEventWireup="true" ValidateRequest="false" CodeFile="SO40AI01.aspx.cs" Inherits="Page_SO40AI01" Title="Untitled Page" %>

<%@ MasterType VirtualPath="~/MasterPages/FormDetail.master" %>
<asp:Content ID="cont1" ContentPlaceHolderID="phDS" runat="Server">
<px:PXDataSource ID="ds" runat="server" Visible="true" TypeName="AI.SO.PrePickList.PrePickListEnq" PrimaryView="Filter" PageLoadBehavior="PopulateSavedValues" />
<callbackcommands>
</callbackcommands>
</asp:Content>
<asp:Content ID="cont2" ContentPlaceHolderID="phF" runat="Server">
<px:PXFormView ID="form" runat="server" DataSourceID="ds" Style="z-index: 100" Width="100%" DataMember="Filter" Caption="Selection" DefaultControlID="edWarehouse" TabIndex="1100" MarkRequired="Dynamic">
<Template>
<px:PXLayoutRule runat="server" StartColumn="True" LabelsWidth="SM" ControlSize="SM" />
<px:PXDateTimeEdit CommitChanges="true" ID="edShipDateStart" runat="server" DataField="ShipDateStart" />
<px:PXDateTimeEdit CommitChanges="true" ID="edShipDateEnd" runat="server" DataField="ShipDateEnd" />

<px:PXLayoutRule runat="server" StartColumn="True" LabelsWidth="SM" ControlSize="SM" />
<px:PXSelector CommitChanges="True" ID="edWarehouse" runat="server" DataField="SiteID" />
<px:PXDropDown CommitChanges="true" ID="edSOSubType" runat="server" DataField="UsrSOSubType" />

<px:PXLayoutRule runat="server" StartColumn="True" LabelsWidth="SM" ControlSize="SM" />
<px:PXCheckBox CommitChanges="True" ID="chkParent" runat="server" DataField="Parent" AlignLeft="True" TextAlign="Left" LabelWidth="sm" />


</Template>
<Activity Width="" Height=""></Activity>
</px:PXFormView>
</asp:Content>
<asp:Content ID="cont3" ContentPlaceHolderID="phG" runat="Server">
<px:PXGrid ID="grid"
runat="server"
DataSourceID="ds"
Height="153px"
Style="z-index: 100"
Width="100%"
AllowSearch="True"
SkinID="Inquire"
TabIndex="1300"

FastFilterFields="OrderNbr, CustomerID">
<ActionBar>
<CustomItems>
<px:PXToolBarButton Text="Print Pre-Pick List">
<AutoCallBack Command="PrintPrePickList" Target="ds" />
</px:PXToolBarButton>
</CustomItems>
</ActionBar>
<Levels>
<px:PXGridLevel DataMember="Orders">
<RowTemplate>
<px:PXSelector runat="server" ID="edCustomerID" DataField="CustomreID" Enabled="false" />
<px:PXSelector runat="server" ID="edOrderNbr" DataField="OrderNbr" Enabled="false" AllowEdit="true" />
</RowTemplate>
<Columns>
<px:PXGridColumn DataField="Selected" Type="CheckBox" CommitChanges="true" AllowCheckAll="true" DataType="Boolean" Width="30px" AllowResize="false" />
<px:PXGridColumn DataField="UsrReportDate" Width="135px" CommitChanges="true" />
<px:PXGridColumn DataField="CustomerID" DisplayMode="Hint" Width="220px" TextAlign="Left" />
<px:PXGridColumn DataField="OrderNbr" Width="90px" />
<px:PXGridColumn DataField="Status" Width="90px" />
<px:PXGridColumn DataField="OrderDesc" Width="250px" />
<px:PXGridColumn DataField="UsrPrePickListPrinted" Width="120px" />
<px:PXGridColumn DataField="UsrPrePickListModified" Width="120px" />
<px:PXGridColumn DataField="UsrPrePickListModifiedReason" Width="250px" />
</Columns>

<Layout></Layout>
</px:PXGridLevel>
</Levels>
<AutoSize Container="Window" Enabled="True" MinHeight="150" />
</px:PXGrid>
</asp:Content>

 

Any updates on this? I have the same issue on Process Invoices and Memos (SO505000).


Any updates on this? I have the same issue on Process Invoices and Memos (SO505000).

I was told the fix would be in 24r1, however, our customer is still on 23r2 and I haven’t checked this issue in 24r1 yet to verify.


Is there an open issue to track? Our customer is also on 23 R2.


Is there an open issue to track? Our customer is also on 23 R2.

My developer support case is closed with a status of “solution confirmed.”  I don’t know if there is an issue somewhere else that is tracking progress.

Their response was “This should be fixed in 24R1 scheduled to be released in March 2024.”

When I asked about 23R2, they said there were no plans to fix in 23R2.


I have a workaround that doesn’t preform as well, but it works for now. I’ll submit a formal case as 23 R2 is a supported version and we should get a fix for it.


Reply