Document services

Document services use documents to represent business objects such as purchase and sales orders, customers, vendors, and so on.

A document service is composed of the following components:

  • Document query : This is a query that is created in the Application Object Tree (AOT) and contains all the tables that are related to the business object that you want to expose. Based on this query, the Document Service Generation Wizard can be used to generate the other artifacts that make up the document service.
  • Table AxBC classes : An AxBC class is a wrapper for a table and contains business logic that is needed for Create, Read, Update, Delete (CRUD) operations.
  • Document class : The purpose of the document class is to contain business logic that is associated with the creation and modification of the business entity itself. For example, the AxdCustomer class could contain logic to handle party information of a customer.
  • Document service class : This is the actual service implementation class and extends the AifDocumentService class. This class implements the service operations that are published through the service contract.

When creating document services, developers need to make sure that the business object is mapped correctly to the document query. The document services framework will handle all other things such as the serialization and deserialization of XML, date effectiveness, and so on.

Document services can be deployed using the integration ports and all available adapters can be used.

Continue Reading ...


Tool can be used for two different purposes. One is to install demo data and other one is elaborated as below. Customers often need to have a production dataset to use when building and validating customizations in non-production environments.

The Microsoft Dynamics AX 2012 Test Data Transfer Tool (beta) is a tool that helps move data between from production to non-production environments or from non-production environments to production environments to make a new production environment. But you must be careful becasue the tool imports data table by table and deletes the data in the table before importing. Hence it is highly advised against running the tool for import in production environments.

Continue Reading ...

Dear all,

We use modifiedField() method to perform any actions after the field is modifed


Create new table with 2 fields ItemId and ItemNameDisplay from Extended Data Types node in AOT then Override modifiedField() in Table’s method node, something likes:

public void modifiedField(FieldId _fieldId)
    InventTable inventTable;
    switch (_fieldId)
        case fieldNum(IBD_Invent,itemid):
            this.ItemNameDisplay = inventTable::find(this.itemid).NameAlias;

the modifiedField() method is located on tables and it is called by a form (or a dataset) when any field is changed. It has field ID as a parameter and therefore it is very easy to write code reacting to a change of a particular field. It is so easy that the modifiedField() method is often used even in such cases, when it really shouldn’t be used.

If you want to get previous field value in the modifiedField() for comparative purpose, you can use this.orig() method:

public void modifiedField(fieldId _fieldId)
    info(strfmt("Field number %1 changed from %2 to %3",_fieldId,this.orig().(_fieldId),this.(_fieldId)));