There's definitely a problem with the Start Loop Through Grid action. I'm seeing this on my Sales Order screen right now, too. The query is running unbounded with no constraint for the current sales order hence a LOOP OVER THE ENTIRE TABLE!
Here's the debug trace for my sales order screen's Loop Through Grid action. See my note at the end...
Query for Loop:SELECT ROW_NUMBER() OVER (ORDER BY VIEWACCSALESORDERLINE.[LINEORDER] ASC) as [ROW_NUMBER], [viewaccSalesOrderLine].[RecordID], [viewaccSalesOrderLine].[TxnLineID], [viewaccSalesOrderLine].[Desc], [viewaccSalesOrderLine].[Quantity], [viewaccSalesOrderLine].[Rate], [viewaccSalesOrderLine].[IsRatePercent], [viewaccSalesOrderLine].[Amount], [viewaccSalesOrderLine].[Invoiced], [viewaccSalesOrderLine].[IsManuallyClosed], [viewaccSalesOrderLine].[Other1], [viewaccSalesOrderLine].[Other2], [viewaccSalesOrderLine].[hiddenInternalCUSTOMFIELD20], [viewaccSalesOrderLine].[hiddenInternalCUSTOMFIELD3], [viewaccSalesOrderLine].[hiddenInternalCUSTOMFIELD4], [viewaccSalesOrderLine].[hiddenInternalCUSTOMFIELD5], [viewaccSalesOrderLine].[hiddenInternalCUSTOMFIELD6], [viewaccSalesOrderLine].[hiddenInternalCUSTOMFIELD7], [viewaccSalesOrderLine].[hiddenInternalCUSTOMFIELD10], [viewaccSalesOrderLine].[hiddenInternalCUSTOMFIELD9], [viewaccSalesOrderLine].[hiddenInternalCUSTOMFIELD8], [viewaccSalesOrderLine].[hiddenInternalCUSTOMFIELD11], [viewaccSalesOrderLine].[hiddenInternalCUSTOMFIELD12], [viewaccSalesOrderLine].[hiddenInternalCUSTOMFIELD13], [viewaccSalesOrderLine].[hiddenInternalCUSTOMFIELD14], [viewaccSalesOrderLine].[hiddenInternalCUSTOMFIELD15], [viewaccSalesOrderLine].[hiddenInternalCUSTOMFIELD16], [viewaccSalesOrderLine].[hiddenInternalCUSTOMFIELD17], [viewaccSalesOrderLine].[hiddenInternalCUSTOMFIELD18], [viewaccSalesOrderLine].[hiddenInternalCUSTOMFIELD19], [viewaccSalesOrderLine].[hiddenInternalCUSTOMFIELD1], [viewaccSalesOrderLine].[hiddenInternalCUSTOMFIELD2], [viewaccSalesOrderLine].[UnitOfMeasure], [viewaccSalesOrderLine].[TxnMethodFlag], [viewaccSalesOrderLine].[hiddenInternalCUSTOMFIELD21], [viewaccSalesOrderLine].[hiddenInternalCUSTOMFIELD22], [viewaccSalesOrderLine].[hiddenInternalCUSTOMFIELD23], [viewaccSalesOrderLine].[hiddenInternalCUSTOMFIELD24], [viewaccSalesOrderLine].[hiddenInternalCUSTOMFIELD25], [viewaccSalesOrderLine].[hiddenInternalCUSTOMFIELD26], [viewaccSalesOrderLine].[hiddenInternalCUSTOMFIELD27], [viewaccSalesOrderLine].[hiddenInternalCUSTOMFIELD28], [viewaccSalesOrderLine].[hiddenInternalCUSTOMFIELD29], [viewaccSalesOrderLine].[hiddenInternalCUSTOMFIELD30], [viewaccSalesOrderLine].[TotalAmount], [viewaccSalesOrderLine].[LineOrder], [viewaccSalesOrderLine].[ItemDetails], [viewaccSalesOrderLine].[TMCInvoicedQty], [viewaccSalesOrderLine].[TMCInvoicedAmount], [viewaccSalesOrderLine].[TMCInvoiceNote], [viewaccSalesOrderLine].[TotalWeight], [viewaccSalesOrderLine].[Fields], [viewaccSalesOrderLine].[Products], [viewaccSalesOrderLine].[TMCPrintMe], [viewaccSalesOrderLine].[LotNumber], [viewaccSalesOrderLine].[SerialNumber], [viewaccSalesOrderLine].[SquareFootage], [viewaccSalesOrderLine].[InvoicedAmount], [viewaccSalesOrderLine].[InvoicedQty], [viewaccSalesOrderLine].[RemainingAmount], [viewaccSalesOrderLine].[RemainingQty], [viewaccSalesOrderLine].[IsFullyInvoicedTMC], [viewaccSalesOrderLine].[Class], [viewaccSalesOrderLine].[Class_RecordID], [viewaccSalesOrderLine].[Item], [viewaccSalesOrderLine].[Item_RecordID], [viewaccSalesOrderLine].[ItemFullName], [viewaccSalesOrderLine].[ItemName], [viewaccSalesOrderLine].[Weight], [viewaccSalesOrderLine].[PackAmount], [viewaccSalesOrderLine].[ItemType], [viewaccSalesOrderLine].[ItemParentFullName], [viewaccSalesOrderLine].[ItemVendor], [viewaccSalesOrderLine].[SalesOrderRecordID], [viewaccSalesOrderLine].[SalesOrderRecordID_RecordID], [viewaccSalesOrderLine].[SORefNumber], [viewaccSalesOrderLine].[SOCustomer], [viewaccSalesOrderLine].[SODate], [viewaccSalesOrderLine].[SalesRepPreferredName], [viewaccSalesOrderLine].[Customer], [viewaccSalesOrderLine].[SalesOrderTMCSalesOrderStatus], [viewaccSalesOrderLine].[SalesOrderSalesRepRecordID], [viewaccSalesOrderLine].[SalesOrderTMCServicedFromClassName], [viewaccSalesOrderLine].[SalesOrderTxnDate], [viewaccSalesOrderLine].[SalesOrderLineGroupRecordID], [viewaccSalesOrderLine].[SalesOrderLineGroupRecordID_RecordID], [viewaccSalesOrderLine].[SalesTaxCode], [viewaccSalesOrderLine].[SalesTaxCode_RecordID], [viewaccSalesOrderLine].[ActivityJobItemWorkOrderID], [viewaccSalesOrderLine].[ActivityJobItemWorkOrderID_RecordID], [viewaccSalesOrderLine].[LocationBin], [viewaccSalesOrderLine].[LocationBin_RecordID], [viewaccSalesOrderLine].[LocationSite], [viewaccSalesOrderLine].[LocationSite_RecordID], [viewaccSalesOrderLine].[TenantID] FROM viewaccSalesOrderLine WITH (nolock) WHERE (viewaccSalesOrderLine.TenantID=@TenantID OR viewaccSalesOrderLine.TenantID IS NULL)
Number of records returned:19848 <<<<<<< --- SHOULD BE LOOPING OVER 2 LINE ITEMS ONLY, NOT THE ENTIRE TABLE. CURRENT SALES ORDER ID AS CONSTRAINT IS MISSING FROM THE QUERY