Filter by records

acioacio Member Posts: 24
Hi All,

could You help? I wanna filter Navison records in some tables by records:
User1 (from User or Salesperson/P..) must see just filtered records where field Salesperson code has value Userr1. User2......

Navision standart ("Security filter" in "Permissions") is not working. SETFILTER in form triggers could be removed by user.


Thanks in advance

Comments

  • lubostlubost Member Posts: 628
    Try to play with FILTERGROUP function to prevent users to change filtering.
  • maschmasch Member Posts: 8
    "Security filter" in permission doesn't work with native database, but with SQL-Server I think. :-k

    If you're using native database you can use the following code in the OnInit-Trigger of the Form:
    FILTERGROUP(2);
    SETRANGE("Salesperson/Purchaser Code",USERID);
    FILTERGROUP(0);
    
    in this way the user can't remove the filter.

    Note: USERID and "Salesperson/Purchaser Code" need the same values, maybe you should synchronise both tables
  • acioacio Member Posts: 24
    Thanksssssssssssss
Sign In or Register to comment.