Markonly with settableview for the lookup page does not work.

Hi Expert.

I want to set some filters for some special senario, i repeat the records, and check some condition, if ok, i mark the record, after the repeat condition, i use markonly, and i got all records what i want, then use settableview, hope it can be displayed in the lookup page, but it doesn't work. please check my code below.

 l_recSalesHdr.RESET;
    l_recSalesHdr.SETCURRENTKEY("Document Type","Posting Date");
    l_recSalesHdr.SETRANGE("Document Type",l_recSalesHdr."Document Type"::Order);
    l_recSalesHdr.SETRANGE("Completely Shipped",TRUE);    
    IF l_recSalesHdr.FIND('-') THEN 
    REPEAT
      IF DimVal1 <> '' THEN BEGIN
        l_recDimEntry.RESET;
        IF l_recDimEntry.GET(l_recSalesHdr."Dimension Set ID",DimCode1) THEN BEGIN
          l_Dimcode := l_recDimEntry."Dimension Value Code";
          IF STRPOS(DimVal1,l_Dimcode) > 0 THEN
            IF NOT CheckIfInWork(l_recSalesHdr) THEN
             l_recSalesHdr.MARK(TRUE);
        END;
      END ELSE IF DimVal2<> '' THEN BEGIN
        l_recDimEntry.RESET;
        IF l_recDimEntry.GET(l_recSalesHdr."Dimension Set ID",DimCode2) THEN BEGIN
          l_Dimcode := l_recDimEntry."Dimension Value Code";
          IF STRPOS(DimVal2,l_Dimcode) > 0 THEN
            IF NOT CheckIfInWork(l_recSalesHdr) THEN
              l_recSalesHdr.MARK(TRUE);
        END;
      END ELSE
        IF NOT CheckIfInWork(l_recSalesHdr) THEN
          l_recSalesHdr.MARK(TRUE);
    UNTIL l_recSalesHdr.NEXT = 0;
    l_recSalesHdr.MARKEDONLY(TRUE);
    l_PSalesList.SETTABLEVIEW(l_recSalesHdr);

Any suggestion will be warmly appreciated.

Gary.

Parents
No Data
Reply Children
Related
Recommended