I know there are many threads about this error. But I didn't find a solution for my problem.
I have a Main_DD (just fields) and an other DD (that shows a list).
If I constrain the other DD by clicking on a filter button then the list shows well, it shows only the records that I want to see. But if I click on the FIRST row of the list i get this error. Because the record that the datadictionary finds is just the first record of the non-filtered list.

Is there a solution for this??

Remark: if the dd of the list is the main_dd, it work's fine (but it's necessary in my application that the list works also fine if it's not the main_dd). And in my case if I am debugging my application it also works fine, but if I stop debugging it's broken.

This is how you can simulate this (a simple piece of code):

Object oOrderHea_DD is a OrderHea_DataDictionary
        Set DDO_Server To oCustomer_DD
        Set DDO_Server To oSalesP_DD

 Object oOrderDtl_DD is a OrderDtl_DataDictionary
        Set DDO_Server To oInvt_DD

        Procedure OnConstrain
            String sSearch sSQL

            Constrain OrderDtl.Order_Number eq '2228'
            WebGet pbSearch of oZoomOrder to sSearch
            If (bSearch) Constrain OrderDtl.Qty_Ordered eq '4'


Set Main_DD To oOrderHea_DD
Set Server  to oOrderHea_DD

Object oWebButton1 is a cWebButton
            Set piColumnSpan to 0
            Set psCaption to "filter"
            Procedure OnClick
                WebSet pbSearch of oZoomOrder to true
                Send Clear of oOrderDtl_DD
                Send Rebuild_Constraints of oOrderDtl_DD
                Send RefreshListFromDD of oDetailGrid //Send FindFromTop also doesn't work

Object oDetailGrid is a cWebList
            Set Server to oOrderDtl_DD
            Set pbFillHeight to True
            Set piColumnSpan to 12
            Set piMinHeight to 200
            Set pbServerOnRowClick to True
            Object oInvtItem_ID is a cWebColumn
                Entry_Item Invt.Item_ID
                Set psCaption to "Item ID"
                Set piWidth to 180
                WebSetResponsive piWidth rmMobile to 130

           Object oOrderDtlQty_Ordered is a cWebColumn
                Entry_Item OrderDtl.Qty_Ordered
                Set psCaption to "Qty"
                Set piWidth to 90
                WebSetResponsive piWidth rmMobile to 50

           Procedure OnRowClick String sRowID
                Send NavigateForward of oZoomOrderDtl Self

Procedure OnNavigateForward tWebNavigateData NavigateData Handle hoInvokingView Handle hoInvokingObject
        Send SetActionButtons
        Send Rebuild_Constraints of oOrderDtl_DD
        Send RefreshListFromDD of oDetailGrid