Configure Microsoft Dynamics AX Connector for Mobile Applications

now you can connect to Dynamics ax 2012 through your mobile application, the following link content white paper explaining the required prerequisites and configuration steps .

Extensible data security Framework– Create Policies [Dynamics AX 2012]

Imparted From here

The extensible data security framework is a new feature in Microsoft Dynamics AX 2012 that enables developers and administrators to secure data in shared tables such that users have access to only the part of the table that is allowed by the enforced policy. This feature can be used in conjunction with role-based security (also supported in Microsoft Dynamics AX 2012) to provide more comprehensive security than was possible in the past. [MS Help]

Extensible data security is an evolution of the record-level security (RLS) that was available in earlier versions of Microsoft Dynamics AX. Extensible data security policies, when deployed, are enforced, regardless of whether data is being accessed through the Microsoft Dynamics AX rich client forms, Enterprise Portal webpages, SSRS reports, or .NET Services [MS help]

Let me walk through with a simple example:

Requirement is to show a particular user only those Bank accounts that belongs to the Bank group “BankCNY

Below are the Bank accounts that are available in my system. By using policy framework on roles , I can restrict user to view only bank accounts that belong to Bank group “BankCNY”


First of all , where are these policies in AX? They are actually in the AOT >> Security >> Policies


Before we create policies, we need to create a query to use it in policies. Remember, try to optimize the queries to the best otherwise it might lead to performance issues.

To keep it very simple, Create a Query by name SR_BankAccountTable by adding data source[PrimaryTable] as “BankAccountTable” and add a range on BankGroupId field and set it to “BankCNY” as shown below


Now let us create a new Role by name SR_BankController as shown below

Go to AOT >> Security >> Roles >> New Role


Set the following properties of the newly created role by right clicking and going to properties


Now lets create duties for this role: In this example I will create one simple duty called “SR_BankAccountsMaintain

Go to AOT >> Security >> Duties >> Right click >> New Duty


Set the following properties for the newly create duty. Name it as “SR_BankAccountsMaintain” and provide label and description as shown below


Now, let us create a new privilege and add entry points [Menu Items] to it to provide only access to the user

Go to AOT >> Security >> Privilege >> New Privilege.


Name the privilege as “SR_BankAccountTableMaintain” and set the label and Description as shown below


Now drag and drop some menu items on to Entry points from AOT >> Menu Items >> Display as shown below


Now add this newly created privilege  “SR_BankAccountTableMaintain” to the duty “SR_BankAccountMaintain” which we have created.


Then, add SR_BankAccountsMaintain duty to the Role SR_BankController


Now, let us create a new Policy by name “SR_BankAccountPolicy” and set the properties as shown below


Set the below properties


In the above screen, Select the context type as “RoleName“ and the role “SR_BankController” and select the query as ”SR_BankAccountTable

PrimaryTable : should always be the first data source Table which you have added in the query. So, select BankAccountTable

A constrained table is the table or tables in a given security policy from which data is filtered or secured, based on the associated policy query. For example, in a policy that secures all sales orders based on the customer group, the Sales Order table would be the constrained table. Constrained tables are always explicitly related to the primary table in the policy [MS Help]

Context [MS help]

A policy context is a piece of information that controls the circumstances under which a given policy is considered to be applicable. If this context is not set, then the policy, even if enabled, is not enforced.
Contexts can be of two types: role contexts, and application contexts. A role context enables policy application based on the role or roles to which the user has been assigned. An application context enables policy application based on information set by the application

we are almost done, we need to add this role= to some user and verify whether he is able to see only Bank accounts that belongs to BankCNY group

Go to System Administration >> Users >> select any user >> Click on Assign roles.

Select “Bank Accounts controller”  and click on Ok Button.


Now , let us log in with the user credentials for which we have assigned the new Role and verify the Bank accounts.

As you see, the user can only see the Bank accounts which belong to “BankCNY” group.


Time and Attendance Registration functionality of Microsoft Dynamics AX 2012


Imparted From here

Dynamics AX 2012 has been amazing with its all new exciting range of features. I found the Time and Attendance registration feature pretty useful and decent and I am sure Microsoft will make it more powerful in the coming versions. Let me first explain you what this functionality is and how it can benefit organizations.

Organizations of all sizes use Time and attendance systems to record when their employees start and stop work, and the department where the work is performed. It’s also a  common practice to track meals and breaks, the type of work performed, and the number of items produced. The Time and attendance functionality of AX 2012 enables organizations to track the time and attendance including the jobs on which the workers are working on a given day. Using this functionality the workers can register various types of times such as Clock in, Clock out, Absence, Breaks, Flex time, Overtime etc. This functionality will find a lot of traction in the manufacturing industries where lot of the workers are paid based on their working profiles and make time registrations.

The below diagram depicts the overall flow of the worker’s time registration process in Dynamics AX 2012.


Now that we know an overview of the Time and attendance functionality, let us look at the setups which we need to make in order to use this functionality.

Basic setup for T&A:

There are a bunch of setups present under the Time and attendance form in the human resource module. Each of these setups as a significance and I will not explain those here as I will primarily highlight the process of the time and attendance recording in this post.


Calculation and Approval groups:

  • The calculation groups are a way to categorize the workers. For example, workers working in ‘same shifts’ or workers working in ‘same teams’. This helps the team lead/manager who calculates the time registrations for approval, to calculate the time registrations for a bunch of workers falling in same calculation group and this ensures reduced time in calculation.
  • Navigate to HR > Setup > Time & Attendance > Groups > Calculation groups and create a new record.
  • Optionally, you can password project the calculation groups by providing a password under the General tab.


  • An approval group is logically same as the calculation group and typically consists of a set or group of workers.
  • Navigate to HR > Setup > Time & Attendance > Groups > Approval groups and create a new record.


Indirect activities and Absence codes:

  • Dynamics AX 2012 enables workers of an organization to register time on several indirect activities which they may work on a given day and it also allows to register hours on absence codes if they are absent from working hours. Few examples of indirect activities are “Meetings”, “Travel” etc. .(Activities which are not directly related to projects, jobs)
  • Four different types of time registrations are allowed for the indirect activities which are “Job”, “Break”, “Switch code” and “On call”. Indirect activities are ideally configured under an activity group.
  • Go to HRM > Setup > Time & Attendance > Indirect activities.
  • Create a new record and select the Registration type from the four option as per your requirement. In my example, I will select Job.


  • Click Activities button.
  • Create new indirect activities such as Test1 and Test 2.
  • Check the Registration check box under General tab and specify account and offset account if needed.


  • You can also setup cost for the indirect activities by clicking the Cost button. Refer to screen below.


  • Similarly absence groups and codes can be configured for recording time for absence from work. If “Education break” is an example of absence group, then absence codes under it could be “ Training”, “Workshops”, “Long term education” etc.
  • Configure the absence groups and codes under HRM >  Setup > Absence > Absence groups.


Setup Worker/Employee for Time Registration:

  • Now that we have done most of the setups required for the Time and attendance function, let us setup the a worker and enable him for time registrations.
  • AX 2012 allows the workers to make time registrations in two forms. The Electronic timecard form and the Job registration form. In this case, we will just enable a worker to make registrations in Electronic time card form.
  • To do this, go to HR > Common forms > Workers > Workers.
  • Select any worker and double-click.
  • Click the Employment tab and expand the Time registration fast tab to set up parameters related to activating the worker for time registrations.


Setup Work Time Profiles:

  • Different work time profiles can be configured for workers working in different working hours and tasks. The worker time profile basically identifies the nature of time registrations which the workers is supposed to make in a given day. For example a worker can clock in, work for standard working hours, take a break, work overtime and clock out. The work time profile basically will contain these profile types.
  • The work time profiles are configured and setup for group of workers usually. For example, workers working on Day shifts may be allocated with a  “day shift” profile and workers working in “evening shift may be allocated with a “evening shift” profile.
  • When the work time profiles are setup in the worker time registration, then the time and attendance system automatically detects the profile depending on the clock-in time of the employee. The work time profile functionality and concept is large and I will cover this in detail in one of my upcoming posts.


Time and Attendance Registration Process in AX 2012:

  • In this post of mine, I will cover only the time registration process using the Electronic time card functionality. I will try to discuss the Clock-In/Clock-Out time registration functionality in posts later.
  • As we have set up Ahmed to register electronic time cards, we will now see the steps which he will follow to make time registrations.
  • Go to Home > Time and Attendance > Electronic Timecard
  • Select the worker. (Ahmad in this case)


  • System will automatically show the profile for the worker and the profile date will default to the current date/day. You can modify the profile date.
  • If you want your registrations not to be modified by team lead or your manager, then you can Lock the profile date by clicking the Lock button.
  • See the screen below in which I have entered a standard day’s time registrations.


  • After filling in the time card, click Check button. System will validate that all your time registrations are fine and checked for any violations.
  • Finally, Click Transfer to, transfer the time registration for calculation and approval.

Calculate and Approve Time & Attendance Registrations:

  • The next task is for the supervisors or the team members to calculate the time registrations done by their workers.
  • During the calculation, the worker time registrations are calculated against the work time profile. If there are any missing registrations, then it is automatically detected during the calculation and system will generate errors indicating these. The team lead or supervisor can then correct and recalculate the registrations.
  • To do this go to HRM > Common > Time and Attendance > Calculate.


  • Select the calculation group and date. The calculation group will enable the supervisor to mass calculate the time registrations for the workers here.
  • Click Ok button.
  • Note that, system may prompt for password if you have configured in the calculation group setup.
  • On the Calculate form, verify all the information and click Update > Calculate button and then click Ok on the


  • After the time registrations are calculated and verified, it needs to be approved. Approval is ideally done by the HR manager/Payroll manager. This is to ensure that the time registrations looks all correct before they are committed and posted in other modules.
  • To approve the time registration, Go to HRM > Common > Time and Attendance > Approve.


  • On the Approve form, click Update > Approve and then click Ok on the batch job.


  • You will get a confirmation that the registration for approved without errors.
  • The next task for the payroll manager or whoever approves the time registrations is to transfer the time registrations. This will ensure that all the transactions are posted successfully to the jobs on which registrations were made.
  • To transfer the time registration click Update > Transfer and then click Ok button on the dialog.


  • Notice that the TR lines will get transferred from the Approve screen.


  • Not let us verify the postings in the different modules. For example in this time registration Ahmed had entered time on the project 10001. So if you go to project 10001 and then to Posted transactions, you will find the the transactions created by the TR system. See screen below.


In this post , I covered,

  • The overall set up required to use the time and attendance system in AX 2012.
  • How to enable workers to make time registrations.
  • The actual time registration process.
  • And the calculation, approval and transfer process for the time registrations. Consider these as the first step to learn this new functionality. I am breaking it down as this is getting way too longer now. clip_image020

In my next post, I will cover the remaining part of this functionality.

  • More about the absence management.
  • Time and attendance workflow.
  • And the complete integration with pay agreements and payroll process.
  • Time registration using the Clock in/out punch clock
  • Which industries types can use and benefit from this ?

delete all company transaction In Dynamics AX

If you want to delete all company transaction in demo data do following:

  1. Find SysDatabaseTransDelete class (AOT -> Classes -> SysDatabaseTransDelete)
  2. Right click on this class and select Open
  3. Agree to delete all transaction.

Workflow Walkthrough – Infrastructure

Basic Requirements for Workflow to Be installed

  1. Dynamics AX AOS with at least SP1 installed
  2. IIS server.
  3. .Net Business Connector (installation described during this tutorial)
  4. EP License (Not officially required, but needed for .Net Business Connector)

Step 1 Workflow Website Installation

Before creating our workflow templates or configuring pre-existing DAX templates, we need to setup the workflow infrastructure including the Windows Workflow Foundation Framework, .net business connector etc., relevant system users and a number of configurations within AX itself. So first things first. Lets setup out Workflow Website containing Windows Workflow Foundation.

  1. Install Internet Information Services (IIS)
  2. Setup a default website on IIS
  3. Run the Dynamics AX server installation file on your IIS machine
  4. Select ‘Add/Remove Components’
  5. Select .NET Business Connector
  6. Click next.
  7. Select a Language for the .NET Business Connector.
  8. Click next.
  9. Click Finish when the .NET Business Connector has finished being installed.
  10. Run the Dynamics AX server installation file on your IIS machine again
  11. Select ‘Add/Remove Components’
  12. Select ‘Workflow’ (Ensure that your active Dynamics AX .NET business connection configuration on your IIS machine (previous steps) is pointing to the correct AOS as the setup wizard will need to connect to your AOS to make some changes)
  13. Click Next
  14. You will be requested to enter a username and password for the user that your business connector will use to login to your AX environment. If you have previously set this up in your environment, the username will not be available to change. You can later set this up in your environment by going to Administration -> Setup -> Security -> System Service Accounts
  15. Select your default website that you would like to add you Workflow Virtual directory/Application to. You can install this to your SharePoint site if you so wish.
  16. Click Next
  17. Select the system account that your AOS is running as, so that the setup wizard will add this user to the list of users allowed to access the workflow website
  18. Click Next
  19. Click Install
  20. Click Finish when the Workflow Installation wizard has finished.

Your workflow infrastructure should now all be ready.

Should you wish to have multiple AOS environments all running Workflow, but only 1 IIS server.

Step 2 Configure your AOS

  1. Login to your Dynamics AX Environment as and administrator User.
  2. Ensure that your email server parameters are correctly setup (Administration -> Setup -> E-mail parameters)
  3. Setup your System Service Accounts (Administration -> Setup -> Security -> System Service Accounts)
    1. Business Connector Account (account used to login to your workflow website and other external tools)
    2. Workflow System Account
    3. Workflow Execution Account
  4. Setup a batch server (Administration -> Setup -> Server Configuration)
  5. Setup a workflow batch group (Administration -> Setup -> Batch Groups), give it a name like WF or WORKFLOW
  6. Run the workflow infrastructure configuration wizard (Administration -> Setup)
    1. In the first screen click Next
    2. Enter the full Workflow Website address that you created above if not already populated
      1. E.G. http://MYSERVER:80/MicrosoftDynamicsAXWorkflow50
    3. Click Validate, you should get a message such saying ‘Workflow runtime URL is valid’ if not you have not setup either your business connector account successfully or the workflow website is not functioning properly.
    4. Click Next
    5. Select the batch group that you created above (this is for the message processing batch job)
      1. If this is greyed out, you can cancel the batch the wizard and go back and delete your already existing workflow message processing batch job)
    6. Click Next
    7. Select the batch group that you created above (this is for the expired work items batch job)
      1. If this is greyed out, you can cancel the batch the wizard and go back and delete your already existing due date workflow batch job)
    8. Select a recurrence time for how often you want workflow to check for expired work items, by default this is every hour.
    9. Click Next
    10. Click Next to confirm, this will create the necessary batch jobs for workflow work item processing as well as due date checking.
      1. To confirm that the batch jobs were create you can check under (Basic -> Enquiries -> Batch Job). There should be 2 new batch jobs created and in a waiting state (“Workflow Message processing” and “Workflow Due date expirations”)
  7. Setup your workflow per company
    1. Setup Workflow Email template (for work item assignments) (Basic -> Setup -> E-mail Templates)
      1. Create a new Email template and name it “Workflow” or something similar, select default language and the name of the user that you want to appear in the Sender and Sender address fields in the email when the user receives a notification about new work item)
      2. Create at least one language template, select a subject and provide the necessary contents for the email by clicking on the template button. You will be able to provide both a text as well as an HTML based template.
      3. You can use a number of ‘tags’ with in your template (and email subject) that will allow you to open and link to the correct notification or record within AX, or simply display more information about the workitem that the user is being emailed about. E.G:
        1. LinkToAlert%/”>View Alert (in the html editor)
        2. LinkToBusinessData%/”>View Record (in html editor)
        3. %Subject% – Displays the subject of the workflow (from WF Configuration)
        4. %Message% – Displays the instruction of the workflow (from WF Configuration)
    2. Setup number sequences (Basic -> Setup -> Number Sequences)
      1. Create number sequences that will be used for your configurations as well as for your actual running instances
      2. E.G.
        1. Configuration Number sequence:
          1. Number Sequence Code: Work_200
          2. Name: Work_200
          3. Smallest: 1
          4. Largest: 999999
          5. Next: 1
          6. Format: ######_200
        1. Instance Number sequence:
          1. Number Sequence Code: Work_201
          2. Name: Work_201
          3. Smallest: 1
          4. Largest: 999999
          5. Next: 1
          6. Format: ######_201
    3. Setup company (for each company) workflow parameters (Basic -> Setup -> Settings for Workflow)
      1. On the first tab select the email template that you have just created (Approval and task notifications)
      2. On the second tab (Administration), your workflow runtime (website) url should already be selected.
      3. On the third tab (Number sequences),  select number sequences created above for:
        1. Configuration Id Work_200
        2. Instance Id Work_201
      4. Close the settings for workflow screen
    4. You company/companies should now be all ready for you to begin developing or configuring workflows.

Keep your eyes open for the Workflow walk-through on Configurations and Template developments.

Please let me know if you have any further comments or tips that you have discovered during workflow infrastructure configuration.

Right on Cue with Microsoft Dynamics AX 2012 Business Intelligence

Your SharePoint 2010 Site Actions Menu is no longer responsive in IE

The menu opens but nothing happens when you click on a menu item

See if this is enabled DivX Plus Web Player HTML5 <video> in your browser, if so disable it like this

Open IE > Tools > Manage Add-ons > Select “DivX Plus Web Player HTML5 <video>” Add-on > Click Disable > Restart IE.

Otherwise try resetting your IE settings in the advanced tab.


If the above not working with you, you can try by Open IE Dev tools (F12), change browser mode to anything , page will refresh, now go back and change it to IE9 and change Document mode to IE8 Standards.