Search for the role tailored client

AdministratorAdministrator Member, Moderator, Administrator Posts: 2,500
edited 2011-10-26 in Download section
Search for the role tailored client
This Add-in and modified itemlist page show how you can implement interactive search in the role tailored client. You can also use this code as a starting point to add your own custom triggers to the RTC, you can do more with add-ins then is apparent.

For a detailed explenation see http://www.erpfood.nl/addins-for-a-bett ... ed-client/

http://www.mibuso.com/dlinfo.asp?FileID=1409

Discuss this download here.

Comments

  • BgestelBgestel Member Posts: 136
    There is always room for improvement :bug: , so here is an update to the search function in NAV.

    The find statement has been changed to findfirst and Currpage.setrecord is added to make the selection move.
        PROCEDURE Search@1100481000(FieldCaption@1100481000 : Text[60];SearchValue@1100481001 : Text[60]);
        VAR
          RecordReference@1100481007 : RecordRef;
          FieldReference@1100481006 : FieldRef;
          LookupFieldNo@1100481002 : Record 2000000041;
          index@1100481003 : Integer;
          found@1100481004 : Boolean;
        BEGIN
    
          RecordReference.GETTABLE(Rec);
          REPEAT
            index += 1;
            FieldReference := RecordReference.FIELDINDEX(index);
            found := (FieldReference.CAPTION = FieldCaption);
          UNTIL (index >= RecordReference.FIELDCOUNT) OR (found);
    
          IF found AND (FORMAT(FieldReference.TYPE) IN ['Code','Text']) THEN
            BEGIN
              FieldReference.SETFILTER(SearchValue + '*');
              IF RecordReference.FINDFIRST THEN BEGIN
                RecordReference.SETTABLE(Rec);
                CurrPage.SETRECORD(Rec);
                CurrPage.UPDATE(FALSE);
                END;
            END;
        END;
    
    **********************
    ** SI ** Bert Van Gestel **
    **********************
Sign In or Register to comment.