Photography

Kamis, 12 Juli 2012

Microsoft Dynamics Navigate 2009 Tips

I Would like to share about how to indexing and select records from database
in Nav in RTC or Page. First of all assume we have all requirements needed :

  1. Microsoft Dynamics Nav 2009 or earlier
  2. MS SQL Server Express edition or later
  3. .Net Platform 4.0 updated
First to do :

1. Open Classic Microsoft Dynamics with SQL Server
2. Open Database and press Shift+F12 to open Object Designer
3. Select Page Designer, and select any table you want to create sort
 
4. Create Fields inside Repeater Group and insert Data field from Record









5. Create new variable named "i" with type integer
6. Press F9 to open Code Unit
7. Place cursor on OnOpen trigger, in here we will place the process
    of sorting and selection
The Code :
 i := 0;         

Rec.SETFILTER("No.",'<>%1','');
IF FINDSET THEN
   BEGIN
      REPEAT
        IF (i < 5) THEN
           Rec.MARK(TRUE)
        ELSE
           Rec.MARK(FALSE);
        i := i + 1
      UNTIL Rec.NEXT = 0;
   END;

Rec.MARKEDONLY(TRUE);



7. Save the page and click Run the object we just created.
8. The number of selection and sort depends on number on Repeat Until..
9. The Conditions for Marked Record can be vary depends on purpose.

Hope My Little Tips would help in learning Navs

Tidak ada komentar:

Poskan Komentar