Access roles from code

Hi All,

We have the essentials version of nav i.e. no responsibility center.

how can i access the roles of a user programatically, so that by the roles assigned to the user i can set filters.

Regards

Harsha

Hello,

You can refer (with a variable or a dataitem in a report) the table 2000000003 - Member Of. In that table you can find all users with their roles in every company and you can filter them as you wish.

Regards,

Same thing, but if you are using Windows Logins they will be in the Windows Access Control table instead.

Hi anca,

first thank you for replying to the post.

i added the table in cal globals. when i access it the table is always emplty.

bu the physical view of the table has data…

harsha

Are you setting filters on your global variable? Doing a FIND? There is no way for a table to contain data and not be able to retrieve it from code that I am aware of.

Hi, Harsha,

Matt is right, you should be able to see with the debugger (and access using code) the same data in the table as you can see from Table Designer.

I think it would be helpful to explain what are you trying to do, or even post some of your code.

Regards,