Check security filter defined in a role

gazpachogazpacho Member Posts: 48
edited 2005-05-17 in Navision Attain
Hi ! I have defined a security filter for a table in a specific role. It sets a filter on Global dimension 1. In certain areas of Navision, I would like to test the value of that security filter so I can use that value in another filter on another table. Is there a way to retrieve, at runtime, the value of a security filter of a role and use this value for other purposes ?

thanks in advance !

Comments

  • kinekine Member Posts: 12,562
    Switch to filtergroup 6 - there are the sec. filters set....
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • gazpachogazpacho Member Posts: 48
    Could you please post an example on how to use this ? When I try the following:

    customer.filtergroup(6);
    temptext := customer.getfilter(global dimension code 2);
    message(temptext);
    customer.filtergroup(0);

    then the temptext string remains empty. What do i do wrong ?
  • kinekine Member Posts: 12,562
    Security filters are set only on form rec. If you want to use them on another variable you must use SETPERMISSIONFILTER.
    customer.SETPERMISSIONFILTER;
    filtergroup(6);
    temptext := customer.getfilter(global dimension code 2);
    message(temptext);
    filtergroup(0);
    
    
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • gazpachogazpacho Member Posts: 48
    Thank you very much Kine. Perfect.
Sign In or Register to comment.