Export Data using Data Management – DMF – Ax 7.0

This is my first post on Ax7.0 which is now referred as Dynamics 365 operations.
Given below the steps to export data for a simple entity using Data management (DMF in earlier versions)
  1. Click on Export
  2. Enter entity details. It is also possible to filter on the entity by clicking on the header in the lookup.
4.  Fill in the entity details
There are three options in “Select Fields”. All Fields/ AutoReport /Importable fields.
5. Click “Add Entity”
You will see a tick mark when the entity is added successfully.
There is an option to “Generate package” automatically when the entity is exported. If not enabled, it can also be downloaded in the final step.
There is an option to filter on the data to be exported.  Click on the Filter given in the below screenshot.
6. Now, the entity is ready to be exported. Click save and Export.
7. Execution log displays as
8. It is also possible to download the package now though the option was not selected earlier.
Package file consists of 3 files as given below
Data file in the specified format
Manifest file – having entity structure
Package Header – defines entity header


Posted in Data Management - DMf, Dynamics 365 Operations - Ax 7.0 | Tagged , , | Leave a comment

CommaIO has quotation in the exported file

When using CommaIO option to export the contents to a file, user  would notice an additional quotation  marks on each field.This is not seen when the file is opened as Excel, but in NotePad++.


Though this is not going to have major impact, there are situations when the file is consumed by other application to process further. In such cases, this would create problem.
So what is the solution ? I tried using TextIO in my code and it solved the problem 🙂





Posted in Ax 2012, Ax2012 | Tagged , , | Leave a comment

Extensible data security model – XDS Ax2012

Security policies enable developers and administrators to block access to subset of data rows and tables. It is similar to Where clause in select statement.
This way administrators can protect data access to unauthorised users. For instance, a payroll manager need not have access to purchase order details.
Previous version of Ax refers this concept as “Record Level Security
We shall take an example where the role has to have access only to the vendors from 4200000 till 4209999 and also the vendor account number starting with 799. Meaning the role should not have access to any other vendor accounts apart from the above mentioned.
Let us see how to implement this XDS in Ax environment. Before that let us get familiarised with new terms used in this policy.
  1.  Primary table  : This is the main table in the query on which the policy is imposed. In our case, Vendor table is the primary table where we have to define the said range.
  2. Constraint table : These tables have foreign key relation on the primary table and their contents will be secured based on range defined in primary table.  In our case, it will be Purchase table where the vendor display will be limited to the values defined in primary table.
  3. Policy query: Every XDS policy has a query where the constraints (ranges) are defined. You can nest multiple data sources in the query.
  4. Policy Context: Context type in the policy. It can be one of the following – Role Property/ Role Name/Context string.
    1. Context String : You specify a value here and this will be matched with the Context string property defined for a role.
    2. Role Name : This specifies the role for which the policy is applied.
    3. Role property : This is used in combination with ContextString to specify multiple roles context.
Now let us start our implementation:
  1. Define a query : We need a query to specify the values to be restricted for the XDS policy.
Since we are restricting certain vendor values for the role, we define them in the range.
2. Next step is create a new policy from AOT -> Security -> Policies.
3. As we already know, primary table here is Vend table. Use the query we created in step 1. Unless the policy is enabled, it will not have effect though mapped to the roles.  The operation type would be “Select”.
4. Next comes “Context Type”. we are using Role Property in order to be used by multiple roles. And the string we define as “Vendors”.
5. Now our query and policy are ready. How do we use them? Answer is create a new role and map the context string defined in the previous step to that role.
6. we are in the final step. In order to test this , make this new role as a subrole to existing role . On logging , the role will be able to see only the vendor records for the range mentioned in the query.
If the XDS policy is to be applied only for a single role, change ContextType to Role Property and the Context string with the value as Role name.
In this way, there is no need of subrole to be defined. Loggind on to the role gets the expected result.
Posted in Ax Security, Ax2012, Dynamics Ax | Tagged , , | Leave a comment

TFS build – No correct build number for the model store

Recently we faced a weird issue in our build generation. Model store generated from the build, does not reflect the recent changes and correct build number when deployed.

This issue came when the previous build failed in Restore step of staging database. Since the staging db was not corrupted , I corrected it by taking the back up from another environment and using the same for the build.

Issue started from here : we get green builds but none of the builds have latest changes . On deploying we found the build number was of the back up DB which I restored from other environment.

Is there any issue with model file ? NO… Model file generated from the build has all the latest changes but model store is not giving proper output.

So , what should I do now ??

  1. Import the model file manually to the database with conflict :overwrite option

  2. Sync and compile

  3. Back up the model DB to the staging DB.

Now , we have correct build number when the model store is deployed.


Posted in Ax2012, TFS build | Tagged , | Leave a comment

Labels not reflected in SSRS reports after manual import

There are situations where you might end up importing labels along with your objects .
If the latest ones are not reflected after import, given below the troubleshooting steps:
  1. Check if the label is found in label editor
  2. Restart all the AOS (if your environment has more than one AOS)
  3. Refresh Report server from Caches
  4. Restart Reporting services from “Reporting Services Configuration Manager”
Posted in Ax 2012, Lables, SSRS Reports | Tagged , , | Leave a comment

A currency code must be specified for an amount field – Ax2012 Workflow

When working with workflow, I faced an error while activating the workflow version –  “A currency code must be specified for an amount field “
I was not sure if it is mandatory to include the Currency field in “Activation” condition. But including that field explicitly did not help on this issue.
One of my condition for activation is including Amount field and giving some values for it. Nobody would have noticed a small grey box next to amount value. Leaving this empty would give the above said error.
On clicking this, user is given an option to choose the currency.
When the currency is selected , error is gone!!!!
Make sure you choose the company currency else you might end up with workflow not getting triggered for your postings…


Posted in Ax2012, Workflow | Leave a comment

Security Roles – Overview tab/Error text missing in workflow history – Ax2012

Recently I faced an issue when Overview tab was missing in Workflow history for a customised role.
Initially I thought it might be the permission issue though the corresponding menu item has full access for the given role.
On digging more, I found few controls on the workflow form are available only for Admin users.
Below highlighted statement in the class “WorkflowStatusForm” defines “Overview” tab to be available only for admin users.
Error text is not displayed for non-admin users due to condition in the below code snippet in the same class



Posted in Ax Security, Workflow | Leave a comment