Hi,
I was trying to use authorization in a way that people who dont have the SUPER role will not be allowed to calculate the vendor score in the Cal Score pushbutton of Vendor menu item. I wrote a code like this:
GVMemberOf = Record of Member Of Table
GVMemberOf.SETRANGE(GVMemberOf."User ID",USERID);
IF GVMemberOf.FIND('-') THEN
GVMemberOf.SETFILTER(GVMemberOf."Role ID",'<>SUPER');
IF GVMemberOf.FIND('-') THEN
ERROR('ABCD');
CalcRoutineCall.
But the code doesn't have any effect. Plz help me how to do it.
0
Comments
Don't forget to filter by the Company Name though.
Rgds,
Jon.
Jon.
and if you are using windows authentication don't forget the Windows Access Control table either...
I mean you can create a function HasRole(RoleName: Code[20]): Boolean like this:
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.