Question

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

  • 9 November 2023
  • 0 replies
  • 46 views

Userlevel 2
Badge

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, Object[] parameters)
at PX.Data.PXView.MergeCache(List`1 list, Object[] parameters, Boolean filterExists, Boolean& sortReq)
at PX.Data.PXView.Select(Object[] currents, Object[] parameters, Object[] searches, String[] sortcolumns, Boolean[] descendings, PXFilterRow[] filters, Int32& startRow, Int32 maximumRows, Int32& totalRows, String[] sortAsImplicitColumns)
at PX.Data.PXView.Select(Object[] currents, Object[] parameters, Object[] searches, String[] sortcolumns, Boolean[] descendings, PXFilterRow[] filters, Int32& startRow, Int32 maximumRows, Int32& totalRows)
at PX.Data.PXGraph.ExecuteSelect(String viewName, Object[] currents, Object[] parameters, Object[] searches, String[] sortcolumns, Boolean[] descendings, PXFilterRow[] filters, Int32& startRow, Int32 maximumRows, Int32& totalRows, Boolean shouldReadArchived)
at PX.Data.PXGraph.ExecuteSelect(String viewName, Object[] parameters, Object[] searches, String[] sortcolumns, Boolean[] descendings, PXFilterRow[] 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>

 


0 replies

Be the first to reply!

Reply


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