mibuso.com

Microsoft Business Solutions online community
It is currently Thu May 23, 2013 9:18 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Search for the role tailored client
PostPosted: Wed Oct 26, 2011 9:17 am 
Offline
Site Admin

Joined: Sun Nov 07, 1999 8:01 am
Posts: 1900
Location: Wilrijk, Belgium
Country: Belgium (be)
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.


Top
 Profile  
 
 Post subject: Re: Search for the role tailored client
PostPosted: Wed Oct 26, 2011 10:57 am 
Offline

Joined: Wed Jan 17, 2007 4:54 pm
Posts: 106
Location: Etten leur
Country: Netherlands (nl)
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.

Code: Select all
    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 **
**********************


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to: