The development process

The key objective of the development process is to ensure a scalable, maintainable, and high-performing application. The following diagram shows the critical steps for the development process while developing customizations for Dynamics AX:

The development process

Conceptualization

The first step of the development process is conceptualizing the application. You must understand the problem that you are trying to solve. At this stage, you need to identify the where and the what—where in the standard flow do you need to add your code, and what code can be reused from the standard one.

Dynamics AX provides numerous application frameworks and patterns that can be reused when developing any new functionality or extending any existing functionalities. If you do not understand the existing application pattern and frameworks, you may create a functionality that was not necessary, or one that already exists in the application.

Data design

Data design is the process of analyzing and defining the data structures as per your requirement. In some cases, you may need to add additional columns to existing tables, or you may need to create one or more new tables from scratch. The following section describes the best practices to be followed when designing the data in Dynamics AX.

Adding fields to the existing tables

Dynamics AX has thousands of standard tables to store the master or transactional data. With the release of Dynamics AX 2012, the number of tables has gone higher than the previous releases because of database normalization. It was mainly done to reduce the redundancy of data across various tables, and also to improve the performance. Many times, the requirement is to store or process additional data in certain application functionalities, and so, you may need to add additional columns to the existing SYS layer tables. Consider the following points when adding additional columns to the existing tables:

  • Do not add a large number of fields to the base tables. The guideline is to limit the maximum number of fields in a table to 50. Normalize the tables if it makes sense to do so.
  • Database normalization is the process of organizing the attributes and tables of a relational database to minimize data redundancy. Normalization usually involves dividing the large tables into smaller (and less redundant) tables and defining the relationships between them. The objective is to isolate the data so that additions, deletions, and modifications on a field can be made in just one table and then propagated through the rest of the database, using the defined relationships.
  • Consider adding the required fields to a new table, and add foreign keys to the base table. Adding fields directly to a base table has the following disadvantages:
    • New fields may not be required in all scenarios, so the query cost may increase with the new fields.
    • If the base layer table is modified or removed, upgrades can be complicated in the future versions of the table. If the fields are added to new tables, you may have to just change the foreign key to associate the customized table with the new table.

Table Types

All the tables in Dynamics AX 2012 have a TableType property, which supports three values:

  • Regular
  • In-memory
  • TempDB

The value is shown in the following screenshot:

Table Types

Regular

These are the regular and permanent tables created in the SQL server transaction database.

In-memory

The In-memory tables in AX 2012 are the same as the temporary tables in AX 2009 and earlier versions. The in-memory temporary tables are instantiated in the active memory of the tier that the process is running on. The process can run on the client tier or the server tier. The objects are held in the memory until the size reaches 128 KB. The dataset is then written to a disk file on the server tier. You can use the In-Memory temporary tables when the amount of data is small, and the Microsoft SQL Server round trips should be avoided.

The following example code shows how data can be inserted and retrieved using X++:

static void TableTmpInsertRecord(Args _args)
{
  TmpCustLedger custTmpLedger;
  ;
  custTmpLedger.Name = 'NameValue';
  custTmpLedger.Balance01 = 2345000;
  custTmpLedger.insert();
  
  while select * from custTmpLedger
  {
    Info(custTmpLedger.Name);
  }
}

TempDB

The TempDB tables are instantiated on the TempDB database of the SQL Server database. The TempDB tables utilize the power of the SQL tables and support joins, aggregation, and indexes with great performance. However, they have almost the same scoping mechanism as the in-memory temporary tables. The TempDB tables also provide the following capabilities which are available with the regular tables:

  • These tables can be company-specific or global
  • They support transaction processing

The following code example shows the use of a TempDB table in X++.

In the following example, all the customer accounts associated with the customer group Corp are filtered into the TempDB table CustTableTmpFilter, and then this table is used in join to filter CustTransOpen:

static void TableTmpDBExample(Args _args)
{
  
  CustTableTmpFilter custTableTmpFilter;
  CustTable custTable;
  CustTrans custTrans;
  CustTransOpen custTransOpen;
  
  Insert_ recordset custTableTmpFilter (CustAccount)
  Select AccountNum from CustTable
  Where custTable.CustGroup = "Corp";
  
  While select sum(AmountCur) from CustTransOpen
  Join AccountNum from CustTrans
  where custTransOpen.RefRecId == custTrans.RecId &&
  JOIN custTableTmpFilter
  where
  custTableTmpFilter.CustAccount == custTrans.AccountNum
  group by AccountNum
  {
    Info(strfmt("Customer:%1, Balance: %2",
    custTrans.CustAccount,
    custTransOpen.AmountCur));
  }
  
}

Table fields

Use the Extended Data Types (EDTs) and base enums to create fields for the tables. The use of EDTs and Base enums reduces work and promotes consistency.

Avoid changing the existing standard base enum values. Modifying the base enum values can have an upgrade impact in the future. In case you need to add new enum values to a standard enum, leave a gap between the existing and the new values. The gap can be useful in avoiding conflict if a new value is added to a standard enum in a future version.

For adding a field to a country-specific or region-specific functionality, add the country/region context on the EDTs and the table fields.

Tip

Extended data types (EDTs): An EDT is a primitive data type or container with a supplementary name and some additional properties. For example, you could create a new EDT called Name and base it on a string. Thereafter, you can use the new EDT in variable and field declarations in the development environment.

Base enums: X++ does not support constants but has an enumerable type (enum), which is a list of literals. There are hundreds of enumerable types that are built into the standard application. For example, the enum NoYes has two associated literals, where No has the value 0, and Yes has the value 1.

Date effectivity

Dynamics AX 2012 introduced the Date Effectivity Framework for handling the date-effective data. A simple example of date-effective data can be a discount table, where the discounts can be effective and/or expired at a certain date/time. To enable the Date effectivity on a table, you need to set ValidTimeStateFieldType to Date or UTCDateTime. This will automatically create date-effective fields in the table. The next thing that you need to do is add a unique index, and set the Alternate key property and the ValidTimeStateKey property to Yes. That's it! Your table now supports date effectivity:

Date effectivity

Table properties

When you create a new table, there are several table properties which need to be set for efficiency and maintenance. The following sections outline some of the key properties.

The table group

Use the following guidelines to set the table group property for the new tables:

Table Groups

Description

Examples

Parameters

This contains the parameter data for the module or features. Typically contains one record per company.

CustParameters, VendParameters

Group

This contains data to categorize the master data.

CustGroup, VendGroup

Main

This contains tables containing the key master data.

CustTable, VendTable

Transactions

Tables containing the transaction data.

CustTrans, VendTrans

Worksheet header

Tables containing the transaction entry data headers.

SalesTable, PurchTable

Worksheet lines

Tables containing the transaction entry lines.

SalesLine, PurchLine

Miscellaneous

Tables which do not fall into any of the other categories.

 

The table caching

Set the appropriate table caching properties for the new tables. This is one of the most important properties of the tables. Not using caching properly can lead to significant performance problems:

Cache lookup property

Description

When to use

Suitable table groups

None

No data is cached.

Use table caching none for tables that are heavily updated.

Transactions

NotInTTS

All the successful key selects are cached. Select the inside transactions' result to database call for retrieving records.

CustTable is a perfect example for NotInTTS. Since the CustTable data can keep changing, it would be wise to use real-time data inside the transactions.

Main

WorksheetHeader

WorksheetLine

Transactions

Found

All the successful caching key selects are cached. All the caching key selects are returned from the cache if the record exists there.

Selecting forUpdate in a transaction forces reading from the database, and replaces the record in the cache.

Suitable for the main tables which do not change, or where the data is almost static such as Units, PaymTerm, and so on.

Main

Group

Parameters

FoundAndEmpty

All the selects on the caching keys are cached, including the selects that do not return any data.

Select forUpdate in a transaction forces reading from the database and replaces the record in the cache.

An example of the FoundAndEmpty record caching is in the Discount table in the Microsoft Dynamics AX standard application. By default, the Discount table has no records. By using a FoundAndEmpty cache on this table, the keys that are queried for but not found are stored in the cache. Subsequent queries for these same non-existent records can be answered from the cache without a round trip to the database.

Group

Main

EntireTable

Creates a set-based cache on the server. The entire table is cached as soon as at least one record is selected from the table.

An EntireTable cache is flushed whenever an insert, update, or delete is made to the table.

Small tables with few records.

Parameters

Group

Index considerations

Indexes are the database objects in the table that provide the efficient retrieval of data. SQL Server provides two types of indexes:

  • The clustered index
  • The non-clustered index

The clustered index

Clustered indexes represent the way the data are physically stored in the tables. There can be only one cluster index per table. A clustered index is required in all the permanent Microsoft Dynamics AX tables. If you don't define a cluster index, RecId is used as one. The clustered indexes are often defined on the primary key (PK) of a table. You can define a cluster index for a table by setting the Table Cluster Index properties as follows:

The clustered index

The non-clustered index

All the other indexes in a table are non-cluster indexes. Non-cluster indexes have a structure that is separate from the data rows. These indexes contain the non-cluster index key values and a pointer to the data rows, called a row locator.

Both the cluster and non-cluster indexes can either be unique non-unique. In Dynamics AX, a unique index is defined when the index's AllowDuplicates property is set to Yes. When this property is set to No, a non-unique index is created.

Best practices for indexes

Consider the following best practices when designing the indexes in Dynamics AX:

  • Assign a unique index to each table. Unique indexes are important for table caching. The Found, NotInTTS, and FoundAndEmpty caching will work only when a unique index exists.
  • The clustered index is a critical property in a table. When you create a new table, the RecId is used as the default cluster index, but in many cases it is not optimal. Analyze the appropriate key and designate it as the cluster index. For example, for CustTable, most of the queries and searches will be based on the customer account number and not on RecId. Hence, the index on the AccountNumber field makes more sense as the cluster index rather than the RecId index.
  • For cluster indexes, do not use the columns that are subject to updates. When a column in a clustered index is updated, the row may have to be moved to a new page, and all the non-clustered index entries for that row will have to be updated. This increases the I/O cost of updates.
  • Clustered indexes do not necessarily have to be unique. When a clustered index is non-unique, the SQL Server adds a 4-byte uniquifier integer to the index entry. This happens only when a duplicate entry is detected; otherwise, the uniquifier is NULL and consumes no space. If there are a few duplicate entries in the clustered index, the incremental cost of a non-unique index is low. Do not add a column to a clustered index solely to make it unique.
  • Consider the size of the clustered index key. Since the clustered index key is used as a row locator in non-clustered indexes in the same table, a long clustered index key can increase the size of the non-clustered index keys.
  • Analyze the usage and queries, and create only the indexes that are necessary. Indexes which are not necessary add costs to the inserts and updates.
  • When there are multiple keys in an index, define the fields in the same order as they will appear in the where clause of the query. If the order is different, the index may not be used during the query execution process.
  • Design indexes to avoid index scans. An index scan requires the entire index to be read. A scan of the clustered index is equivalent to a table scan.
  • Ax 2012 has the ability to use the included columns in non-clustered indexes for providing query coverage. Use the included columns as they may provide better I/O results as compared to adding columns in the key. A common example is seen in the case of date-effective tables, where the ValidTo column is defined as an included column.

Tables key considerations

Keys, as the name suggests, are a key part of a relational database and are used to enforce data integrity and table relations. In Dynamics AX, the keys are maintained at the application level and not in the SQL database. The following are the type of keys used in the Dynamics AX tables.

The alternate key

An index in Dynamics AX can be set as an alternate key by setting the Alternate Key property to Yes. An alternate key means that the other tables can create foreign key relations that reference this key as an alternative to referencing the primary key. A unique index with only one field can be defined as an alternate key. There can be multiple alternate keys in one table.

The primary key

The primary key is usually the type of key that the child tables refer to when a foreign key field in other tables need a relational identifier. There can be only one primary key in one table. In Dynamics AX, the primary key can be defined on the Table Primary Index property. Only a unique index with the property Alternate Key set to Yes can be defined as a primary key.

The replacement key

A replacement key is an alternate key that the system can display on forms instead of a meaningless numeric primary key value. Each table can have a maximum of one replacement key. In Dynamics AX, replacement keys can be selected on the table property as ReplacementKey.

The foreign key

In Dynamics AX, foreign keys are represented by table relations. In order to create a foreign key in a child table, you need to add a relation node to the parent table. Foreign keys are used to provide lookups and validation for the parent table record when used from the child record.

The natural key

The natural key is a term used to represent the keys which are meaningful to the users. Most of the replacement keys are natural keys.

Surrogate keys

The system fields as key fields such as RecId are not meaningful to the users, but are good to use as a primary key and a foreign key. Since surrogate keys are not attached to the business, even if the natural key changes, the references to the surrogate key do not need to be updated.

The delete actions

Define the delete actions on the tables to delete the related records from the child tables. Delete actions are better than writing a code to delete the records from the child tables.

Delete actions rely on table relations so if you create a delete action, make sure that there is a relationship defined between the relevant tables.

The business logic

The business logic is a part of a program or code that encodes the real-world business scenarios. In Dynamics AX, the business logic can be written at multiple levels, such as the form UI, enterprise portal ASP.Net code, table method, classes, SSRS reports, and so on.

While working with the customization requests for Dynamics AX, there are typically two kinds of scenarios presented to the developers. The first scenario is a standalone functionality, where new forms, tables, and business logic need to be developed and later integrated into the core modules. In the second scenario, the existing processes within the AX application need to be extended to support the requirement. In both cases, it's important for the developers to understand how the business logic for the core module and functionalities is implemented in the application layer. Understanding the implementation of the core functionalities and the framework is extremely important for the developers so that they can efficiently utilize, reuse, or extend these functionalities in their custom solution. In any case, customizations need to be added on a temporary basis. The customizations should be easy to isolate and remove when they are not needed anymore, or when the required functionality is added to the product in a later release. The following are some core technical application frameworks that a developer may need to know when creating custom features and functionalities.

The number sequence framework

Microsoft Dynamics AX contains a number sequence framework to generate alphanumeric number sequences. These sequences can be used for transaction documents, such as sales orders, purchase orders, invoices, and journals, or for master data entities such as customers, vendors, and employees. The primary purpose of the number sequence framework is to provide unique, user-friendly identifiers while maintaining a continuous or non-continuous alphanumeric sequence.

If your custom application needs to implement a number sequence, you can extend or utilize the number sequence framework to enable the number sequence code for your feature. The MSDN article at https://msdn.microsoft.com/en-us/library/aa608474.aspx provides a detailed description of number sequences.

The FormLetter framework

The FormLetter framework is used for posting business documents such as sales orders and purchase orders. This framework contains a number of class hierarchies and controls for document processing.

The key features of this framework are as follows:

  • It interacts with the posting forms, such as SalesEditLines
  • It creates and maintains the posting data, such as records in SalesParmTable
  • It can create journal data, such as records in CustPackingSlipJour or CustPackingSlipTrans
  • It enables validations
  • This framework updates the sub ledgers such as ledger and inventory
  • It controls the document outputs such as printing and XML export

The RunBase framework

The RunBase framework provides a standardized approach for creating processes and batch jobs in Microsoft Dynamics AX.

The key features of this framework are as follows:

  • Query to define the filter criteria
  • Dialog, with persistence of the last values entered by the user
  • Validation of user input
  • Batch execution for the users to schedule jobs
  • Progress bar
  • Client/server-optimization

Refer to https://msdn.microsoft.com/en-us/library/aa863262.aspx to understand the RunBase framework in more detail.

The SysOperation framework

Use the SysOperation framework for extending Microsoft Dynamics AX by adding a new functionality that may require batch processing. The SysOperation framework replaces the RunBase framework. It provides the infrastructure for creating user-interaction dialog boxes and integration with the batch server for batch processing.

The important features of the SysOperation framework include the following:

  • It enables the menu-driven or batch execution of services.
  • It calls the services in a synchronous or an asynchronous mode.
  • It automatically creates a customizable UI based on the data contract.
  • It encapsulates the code to operate on the appropriate tier (prompting on the client tier, and business logic on the server tier).
  • Combining the SysOperation framework and services creates a good foundation for reusing the business processes for multiple user interfaces. For example, you can use the sales order invoice service for both, the rich client and the Enterprise Portal for Microsoft Dynamics AX, or for a custom C# application.
  • The SysOperation framework supports a dynamic UI and different execution modes from X++, which makes the development very clean and reusable.
  • For a comparison between the SysOperation and RunBase frameworks, and to view the sample code that illustrates interactive and batch execution, refer to the white paper, Introduction to the SysOperation Framework available at https://technet.microsoft.com/EN-US/library/hh881828.aspx.

Services and the Application Integration Framework (AIF)

Use services and AIF to code the business processes. The services can be used for normal business processes as well as for integration scenarios. Microsoft Dynamics AX 2012 supports the following three kinds of services:

  • Document services are query-based services that can be used to exchange data with the external systems by sending and receiving XML documents. These documents represent business entities, such as customers, vendors, or sales orders.
  • Custom services can be used by the developers to expose any X++ logic, such as X++ classes and their members, through a service interface. An example for custom services is a workflow approval via the e-mail service.
  • System services provided by Microsoft Dynamics AX include the query service, the metadata service, and the user-session service. The system services are not customizable, and they are not mapped to any query or X++ code.
  • Developers should use the existing services exposed in the Microsoft Dynamics AX base layer. Expose any new business processes through services.
  • For additional details on Services and AIF and the scenarios in which the document services or custom services can be used, refer to Chapter 3, Infrastructure Planning and Design.

Other application and development frameworks

There are many such features and frameworks available in Dynamics AX. The following table lists a few of these frameworks and some useful links for additional details:

Framework

Description

Useful links

The global address book

This implements the party, association, and the address. The developers need to understand the global address book concept to implement any address or party-related functionality on custom objects.

https://technet.microsoft.com/en-us/library/hh272867.aspx

Financial account and dimensions

The financial account and dimension framework is core to the Shared financial accounting model and unlimited financial dimension architecture. The developers need to understand the underlying data model and the APIs available for integrating the custom modules to the financial module of AX.

https://technet.microsoft.com/EN-US/library/hh272858.aspx

The Source Document Framework

The Source Document Framework (accounting framework) will provide the functionality that is necessary for recording business events, and create accounting for the newly created documents, that is, accounting distributions and sub ledger journal entries.

http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/04/26/extending-the-source-document-framework.aspx

The Product Data Management Framework

This is a framework for managing the product attributes and for releasing the product to legal entities. It is very common to get customization requests in the Product management module and hence, the developers should understand the underlying data model and processes for customizations in this module.

https://technet.microsoft.com/EN-US/library/hh272877.aspx

The Budget Control Framework

The Budget control framework enables a budget control check on the processing of certain documents such as purchase requisitions, purchase orders, and projects. To extend the budget check functionality to a new module or to customize any process around it, the developers need to be aware of this framework.

https://technet.microsoft.com/EN-US/library/hh272864.aspx

The Reporting framework

The Reporting framework provides the ability to link the Dynamics AX application to the SQL Server reporting services. Using the reporting framework, the developers can define the business logic, datasets and user interfaces for providing report parameters and for calling the SSRS report execution process.

https://technet.microsoft.com/EN-US/library/hh500190.aspx

The Policy framework

The Policy framework provides the ability to define the organization policies such as purchasing policy, security policy, centralized payment policy, and so on. It enables the developers to define the rules for each policy, which can be evaluated during document processing. The developers can extend the existing policy by adding more rules, or they can implement a new policy if required.

https://technet.microsoft.com/en-us/library/hh272869.aspx

The Workflow framework

The Workflow framework provides the ability to define the business rules and approval process for document processing. This framework can be extended easily to any new custom document, or additional workflow controls can be implemented using the workflow framework.

https://technet.microsoft.com/en-us/library/gg731908.aspx

The Data Export Import Framework (DIXF)

The Data export and import framework provides the ability to export and import the configuration or initial transactional data for data migration and configuration purposes. This framework can be utilized to build typical file import scenarios or asynchronous file-based integration scenarios.

https://technet.microsoft.com/EN-US/library/jj933277.aspx

Best practices to customize business processes

The following sections describe the best practices when you customize the business logic in Dynamics AX.

Reusing the code

As explained earlier, Dynamics AX provides numerous application frameworks. When developing the custom features, you should be able to extend the existing frameworks or reuse the code for your customization. The suggestion is to try not to reinvent the wheel, but investigate and utilize what is already available in the system.

Using eventing

The use of events was a new concept that was introduced in the Dynamics AX 2012 release. Using events, you can create pre- and post-events to implement custom behavior.

Using events, you can add custom behavior to the standard business logic, without over- layering the base layer code to your custom layer. Events has the potential to lower the cost of upgrades to the later versions.

Events can be useful in supporting the following programming models:

  • Observation: Events can be used to look for exceptional behavior, and to generate alerts when such behavior occurs. An example of this event is to alert the customer contact in case the customer credit limit has reached a certain threshold.
  • Information dissemination: Events can deliver the right information to the right consumers at the right time. Information dissemination is supported by publishing an event for anyone wishing to react to it.
  • Decoupling: Events produced by one part of the application can be consumed by a completely different part of the application. There is no need for the producer to be aware of the consumers, nor do the consumers need to know the details about the producer. One producer's event can be acted upon by any number of consumers. Conversely, the consumers can act upon any number of events from many different producers.

TechNet provides detailed information on Eventing in AX 2012 at https://technet.microsoft.com/en-us/library/hh272875.aspx.

Customizing the code

When the base layer code needs to be replicated or used in other places, it is always better to extend the existing classes and modify the derived class for the change in behavior, rather than creating completely new classes and then copying the entire code from the base class.

Extending the standard business logic by extending the class will makes it easier to upgrade the code. If you have created an extension, only the modified code must be restructured.

Create classes and methods so that the same piece of code can be reused in multiple places. Avoid creating long methods. They make the code difficult to read, hard to debug, and extremely difficult to upgrade and maintain.

Do not keep the commented code if you want to avoid the upgrade and maintenance costs. Keep the older version of the code in version control.

Where to add the custom code

Create the customizations in the appropriate location. Create the code for reuse as much as possible, but create it at the lowest appropriate location. For example, if something is required only in a form, do not put it at the table level.

The following examples describe the locations at which we recommend that you place the code:

  • If it is related to the UI, place the code on the appropriate UI elements, or create classes to handle the scenarios specific to the UI. For example, you can create classes that handle controls, number sequences in forms, dialog boxes, and so on.
  • If it is related to a business process, place the code in classes.
  • If it is directly related to the tables and schemas, place the code in the tables.
  • Consume the existing Microsoft Dynamics AX classes and table methods instead of writing direct X++ queries.

The user interface

When designing the user interface in Dynamics AX, follow the standard AX form templates and the UX guidelines to create familiar and consistent form patterns for the customized features.

Client user interface guidelines

The following sections define the different form types available in standard Dynamics AX and their usage scenarios.

The list pages

The list pages display a list of related data and provide the ability to quickly filter, take actions, and open the detail forms. They also display related information for the selected records as fact boxes. List pages are the starting point for performing the bulk of daily activities for the business users, such as creating and editing customers.

The following screenshot shows the standard customer list page:

The list pages

The details forms

The details forms are the primary methods for data entry. Using the details forms, the user can create, edit, and take action on data. The details forms also contain fact boxes on the right-hand side to display any related information. The following image shows a customer details form:

The details forms

Details forms with lines

The details forms with lines have one form with a header and a line view which the user can toggle to switch between the views. An example of the sales order details form is seen in the following screenshot:

Details forms with lines

The simple list

The simple list form is typically used to display the reference data. For example, the customer group is shown in the following screenshot:

The simple list

The simple details forms

The simple details forms are forms having a single page containing the details information. It is the recommended pattern for creating or viewing related or referenced data, as shown in the following screenshot:

The simple details forms

The simple list and details forms

The simple list and details forms contain the simple list and details page forms on a single page. These forms are useful for reference data with multiple fields. For example, payment terms, as shown in the following screenshot:

The simple list and details forms

The table of content forms

The table of content forms use vertical buttons on the left to navigate and display the content on the right side of the page. The following screenshot displays the pattern that is recommended for the parameters forms:

The table of content forms

Enterprise portal user interface guidelines

Enterprise portal is the web interface for Dynamics AX. Enterprise portal UI guidelines follow patterns similar to the ones described in the AX client. The following sections define the three common page layouts in enterprise portal.

List pages

The list pages in Enterprise Portal are exactly the same as the rich client list pages and provide a similar functionality.

The details forms

The details forms in Enterprise Portal provides patterns similar to the details form in the AX client:

The details forms

The two-phase create dialog

This is typically used to create a header record before creating a line record. The following screenshot is an example of a two-phase create header creation dialog:

The two-phase create dialog

Report user interface guidelines

Typically, there are three types of report UI's in Dynamics AX: outgoing documents, simple lists, and grouped lists layouts.

The document type reports

The following screenshot displays the purchase order report layout in Dynamics AX. Most of the external facing reports, such as purchase order, sales order packing slip, sales order invoice and so on, use the same layout:

The document type reports

The simple list

The simple list reports are usually internal production reports used for data analysis. The following screenshot displays the On-hand Inventory reports, which display the on-hand information about the products:

The simple list

The group list type

The group list type reports are also used for internal production reporting. This report layout is used to display summarized transactional details and include sub totals and grand totals. The following screenshot displays Customer transactions grouped by customers:

The group list type

Security

Unlike the earlier versions of Dynamics AX, AX 2012 security definition is a development task, and the ground work for the supporting security definition of the custom objects should be done as part of the development process.

Key concepts

The Dynamics AX role-based security is based on the following key concepts:

Key concepts

Security roles

The security roles that are assigned to a user determine the duties that the user can perform and the parts of the user interface that the user can view. All users must be assigned to at least one security role for accessing Microsoft Dynamics AX.

Duties

Duties correspond to the parts of a business process. The administrator assigns duties to security roles. A duty can be assigned to more than one role.

The process cycle

To help the administrator locate the duties that must be assigned to roles, duties are organized by the business processes that they are a part of. In the context of the security model, business processes are referred to as process cycles. For example, in the accounting process cycle, you may find the maintain ledgers and maintain bank transactions duties.

Privilege

In the security model of Microsoft Dynamics AX, a privilege specifies the level of access that is required to perform a job, solve a problem, or complete an assignment. Privileges can be assigned directly to roles. However, for easier maintenance, it is recommended that you assign the privileges to duties and duties to roles.

Permissions

Each function in Microsoft Dynamics AX, such as a form or a service, is accessed through an entry point. The menu items, web content items, and service operations are collectively referred to as entry points.

In the security model for Microsoft Dynamics AX, permissions group the securable objects and the access levels that are required to run a function. This includes any tables, fields, forms, or server-side methods that are accessed through the entry point.

Policies

These are used to restrict the data that a user can see in a form or a report. This is a new method in Dynamics AX 2012 to limit the data, similar to what you have with record level security. With this feature, you create a query with restrictions. Then, you create a security policy that can be applied to a security role. For example, if you wanted to limit your accounts-payable clerks from seeing the retail vendors, you could create a query on the vendor group table with a range that limits the retail vendors. You would then create a policy that includes this query and the security role.

Security for custom objects

While the administrators can maintain the security role assignment for individual users, most of the work for creating the security objects needs to be done by the developer in the AOT. The following security related tasks need to be created by the developers:

  • Each user interface element in the AOT such as forms, menu items and reports has a security node. The developers must define appropriate security at the object level. In a normal scenario, the default security policy for the object is created automatically based on the properties defined at the form data source and control level. In advance scenarios, the developers can override the default security permission at the control level.
  • The developers should create the appropriate privileges and add entry points (menu items and web page URL) to associate the functionality.
  • Custom duties and roles should be created for custom functions, before they can be assigned to the users.
  • The security policy nodes should be created by the developers to use the XDS security models in Dynamics AX.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.156.231