Filtering for different user groups

Hi, how can I make visible a field only for the member of a group, e. g. for the gourp of managers? How can I ask if somebody is member of the definied group (like curuserid())? Thanks András

Hi You can only go through the table UserGroupList and search if the curuser is member of the group. The table UserGroupList is the table where Axapta stores this info.

Or you can write a solution similar to the user validation list found in the Chart of Account form

Hi there, I might have misunderstood the requirement, but what is wrong with using Axapta Security Keys to control the access to that field? Regards, H. Jaeger Aston Business Solutions

Hi, Henrik, thanks, the reg. key works! But how can I (during runtime) set for a field visible(true)? András

Hi András On the form you can set autodeclaration to Yes on the field on the design. Then you can set it to fieldname.visible(false) or fieldname.visible(true) in, for example the “active” method on the datasource for the field in question. John

You should note that setting visible(true) does not necessarily mean that it will become visible. If security disallows showing the field to the current user then the fieldname.visible(true) has no effect (so you don’t risk showing fields that the user shouldn’t be allowed to see). In general, setting the visible property should only be used for “convenience hiding”. Use security keys / security system for restricting access to fields.