web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Security roles - access to list of specific customers by customer group

(0) ShareShare
ReportReport
Posted on by 242

Hi all,

I am working on a project and having some requirements from the clients related to the setup of security roles for users.  Our clients required us to set up access for users that only some of them can have access to the list of certain customers while other users cannot view, based on their company's policies. The customers are currently distinguished via customer groups.

I have tried modified the access levels to view the customer list with security roles, duties, privileges and permissions, but all I can do is to grand or take away access to view the whole customer list but not for some specific customers. I assume this has to be done using some coding for the customization.

Anyone has any idea to help me with this problem? Thank you in advance

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    Security Policy is the way to do it. you can develop a new security policy.

    that security policy can operate based you custom setup

  • André Arnaud de Calavon Profile Picture
    301,037 Super User 2025 Season 2 on at

    Hi Tung,

    You can setup address books and enable the address book security on the Global address book parameters. You can setup teams with persons and assign these to the address books.

    Per customer you need to attach one or more address books.

    If you want to use the customer group, you need to develop a new security policy like Sohaib mentioned.

    Note that users with the system administrator role will always see all customers.

  • Verified answer
    Yohann Rolland Axcible Profile Picture
    3,111 on at

    Hi,

    maybe try this.

    Go to System Administration > Setup > Security > Record Level Security, and new.

    With the wizard select the role you want to restrict Customer list.

    Then you will be prompt to add a table (select the Customer one) to setup a query (in order to restrict data on that specific table).

    If your user has several roles and you have setup restriction only on one (and nothing particular on the others), the query won't work.

    I hope it will help.

  • lally Profile Picture
    8 on at

    Hi Andre ,

    Where is the option to attach the address books in the customer master in AX 2012 R2 ?

  • Tung Duong Profile Picture
    242 on at

    Hi Sohaib,

    I followed your suggestion and found this article in the link msdn.microsoft.com/.../hh300643.aspx. The article has guided me to set up a new security policy to restrict the access to certain records of customer groups, customers or sales orders based on the customer group define in the CustGroup table. However, it seems that I can only apply this security policy to specific security roles based on the guidance. Is there any way that I can apply my new created security policy to specific users (which is more convenient in my case)?

    Thank you in advance,

  • Suggested answer
    Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    to restrict it to certain users, you can do following

    1) Create a customized role.

    2) assign security policy to that role only

    3) assign newly created role(#1) to any user, whoever you want.

    Alternatively you can do following

    • Create a customized Table named CustGroupPermissions, this table can have two fields as under
    1. CustGroup
    2. UserId

    UserID

    AllowedCustGroup

    User1

    10

    User2

    10

    User2

    20

    User3

    30

    • Now create a another tempTable named as MyCustGroup.
    • this new table MyCustGroup will have only one field named as CustGroup
    • create a xds method of with refresh frequency per session
    • inside xds method, take records from CustGroupPermissions and insert those in MyCustGroup
    • apply security policy based on MyCustGroup  

    this will server you in a way if you want a user to have access to 1 CustGroup, you can manage, if you want to provide access to a user to have access to all custGroups, you can.

  • Tung Duong Profile Picture
    242 on at

    Hi Yohann,

    I have tried setting up the record level security based on your suggestion and it worked pretty well. But like you said, I had to consider all the security roles of the user for that if I only restrict access to customer list on a single role but the user has other roles which also  give access to the customer list then that single restriction would be not effective enough.

    In this case, I think Sohaib's solution is quite a little bit more convenient that the assignment of the security policy on a single role can "overrule" the access level of other roles for that user. Anyway, thank you for your suggestion.

    @Sohaib: thank you for your detailed solutions, now I am able to solve this problem. Much appreciated!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans