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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :

Automatic role assignment in AX2012 – part 1

André Arnaud de Calavon Profile Picture André Arnaud de Cal... 303,273 Super User 2026 Season 1

Last time I wrote about the standard batch jobs in AX and promised to come back on the automatic role assignment in Microsoft Dynamics AX 2012. I will explain two examples. One example will be based on using a query out of the box. The second will be described in my next post and will give an example how to create a new query for this feature.

Automatic role assignment

First a quick overview of the automatic role assignment. When a rule has been added the batch job will periodically check whether users should be added or removed from a role. In the next example some people are assigned automatically because of the rule. You can also add users manually. Also on this form a button exists for executing the automatic role assignment. This will then run immediately for the current selected role.

AssignRole1-3

When specifying the rule, you can also assign organizations to limit the number of companies where the role applies. If the user is added automatically you cannot override the assigned organizations for this user.

When persons needs to be excluded which were added automatically, you can Remove this user or use the Manage assign/exclude form. In the picture below you will notice that PRAKASH was excluded manually. When the automatic assignment job checks this role again, the manual excluded users will be skipped.

AssignRole1-4

You can find more information on Technet: http://technet.microsoft.com/en-us/library/gg751367.aspx

 

Adding Project timesheet user role

The sample for this post is adding users to the role Project timesheet user. There could be a business scenario when the Project setup contains a value in the field Period code, the user is supposed to write time and thus requires access to the timesheets in the Dynamics AX client or the Employee Selfservice. They can also use mobile apps for Microsoft Dynamics AX for managing their timesheets. Recently I wrote a review on the Timesheet and Expense management apps.

AssignRole1-1

A user can have a relation with a person in AX (global address book record). This person is linked to the worker. The worker is linked in the project setup table. This is show in the datamodel below.

AssignRole1-2

When creating the automatic role assignment the query ‘Select all users‘ can be used as source query.

AssignRole1-5

Click Edit query to open an advanced query form where we can specify the criteria. We have to add the tables by right click the existing table and choose to add the tables based on the relation. The period code field wil be filled to have excluded Project worker records where this field is empty or specify a value.

AssignRole1-7

Click OK. Then wait for the batch job picked up the new rule or run the assignment manually. The users will be added based on the above criteria.

AssignRole1-8

 

That’s all for now. Till next time!

 

DAXsmallbanner

rss Subscribe to this feed


This was originally posted here.

Comments

*This post is locked for comments