Monday 31 December 2012

Microsoft Dynamics AX 2012 - Data Integrity

There are a number of concepts and features to consider when adding, modifying, or deleting data to ensure that the integrity and consistency of the data is maintained. These include:
  •     Using table DeleteAction elements.
  •     Using the forUpdate keyword correctly in select statements.
  •     Enabling transactions in your code.
  •     Avoiding deadlocks.
  •     Implementing Optimistic Concurrency Control (OCC).

My above blog is based on Microsoft's Official information.
 
I hope this blog about 'Microsoft Dynamics AX 2012 - Data Integrity' was informative. Please feel free to leave your comments.

Microsoft Dynamics AX 2012 - Tables, Views, and Maps

Tables, views, and maps are elements that X++ SQL statements can reference to read and write business data. These elements are specified in the Application Object Tree (AOT) under AOT > Data Dictionary.

The following describes these elements.
  • AOT element: Tables
Description: Tables store business data. Each table in the AOT has a corresponding table in the underlying Microsoft SQL Server database.
In Microsoft Dynamics AX, tables have advanced features beyond what tables might have in the underlying database. The advanced features include the following:
  1. Method members - A table can have methods, just as a class in X++ or C# can have methods.
  2. Table inheritance - A table can extend, or be derived from another table. That same table can be the base table for several derived tables.
  3. Valid time state - A table can be configured to track data relationships for specific date-time spans.
Tables are specified at AOT > Data Dictionary > Tables.
  • AOT element: Views
Description: A view is an X++ SQL select statement that is given a name that is reusable in other X++ SQL statements. The select statement of the view can reference one table, or it can join tables. Also, a view can reference other views, or a mix of views and tables. A view can also reference maps.

Developers are encouraged to consider using an AOT query element as the source of data for their view.

Views are specified at AOT > Data Dictionary > Views.
  • AOT element: Maps
Description: A map can unify the access to similar columns and methods that are present in multiple tables. You associate a map field with a field in one or more tables. This enables you to use the same field name to access fields with different names in different tables. Methods on maps enable you to create or modify methods that act on the table fields that the map references.

Maps are specified at AOT > Data Dictionary > Maps.
A query can use tables, views, or maps for its data sources. Queries are specified at AOT > Queries.

My above blog is based on Microsoft's Official information.
 
I hope this blog about 'Microsoft Dynamics AX 2012 - Tables, Views, and Maps' was informative. Please feel free to leave your comments.

Microsoft Dynamics AX 2012 - Types of Reports

The following describes the types of reports that you can create by using the reporting and analytical features of Microsoft Dynamics AX 2012.

Category:  Transactional reports

 

Transactional reports retrieve data from the transaction processing database for Microsoft Dynamics AX.

  • Tool that is used to create the report: Visual Studio 
Format of the report: Reporting Services report 
Type of user who typically creates this kind of report: Developer
  • Tool that is used to create the report:  Microsoft Dynamics AX list page
Format of the report: Excel worksheet
Type of user who typically creates this kind of report: System administrator, Application user
  • Tool that is used to create the report:  Microsoft Dynamics AX auto-report wizard
Format of the report: Reporting Services report
Type of user who typically creates this kind of report: System administrator, Application user
  • Tool that is used to create the report:  Microsoft Dynamics AX add-in for Excel
Format of the report: Excel worksheet
Type of user who typically creates this kind of report: System administrator, Application user
  • Tool that is used to create the report:  Management Reporter for Microsoft Dynamics ERP
Format of the report: Management Reporter report
Type of user who typically creates this kind of report: System administrator, Application user

Category:  Analytical reports

 

Analytical reports retrieve data from Microsoft SQL Server Analysis Services cubes.

  • Tool that is used to create the report:  Visual Studio
Format of the report: Reporting Services report
Type of user who typically creates this kind of report: Developer
  • Tool that is used to create the report:  SQL Server Business Intelligence Development Studio or SQL Server Data Tools
Format of the report: Key performance indicator (KPI)
Type of user who typically creates this kind of report: Developer
  • Tool that is used to create the report:  SQL Server Report Builder
Format of the report: Reporting Services report
Type of user who typically creates this kind of report: Developer, System administrator
  • Tool that is used to create the report:  Excel
Format of the report: Excel worksheet
Type of user who typically creates this kind of report: System administrator, Application user

My above blog is based on Microsoft's Official information.
 
I hope this blog about 'Microsoft Dynamics AX 2012 - Types of Reports' was informative. Please feel free to leave your comments.

Monday 19 November 2012

Microsoft Dynamics AX 2012 - What's New: Analytics for IT Professionals

This topic describes the new features for online analytical processing (OLAP) in Microsoft Dynamics AX.

Deployment of cubes


The process for deploying the default Microsoft SQL Server Analysis Services cubes that are included with Microsoft Dynamics AX has changed. The following sections provide more information.

The Setup wizard has changed

To deploy the default cubes that were included with Microsoft Dynamics AX 2009, you had to install the analysis extensions when you ran the Setup wizard. In Microsoft Dynamics AX 2012, the Setup wizard has been changed. The Setup wizard no longer includes an option for installing the analysis extensions.

When you run the Setup wizard, you can select the Analysis Services configuration option. When you select this option, the Setup wizard will:
  • Verify that prerequisite software has been installed on the server that runs Analysis Services.
  • Prompt you to specify the domain accounts that will be used to process cubes. The Setup wizard gives these accounts read access to the online transaction processing (OLTP) database for Microsoft Dynamics AX.
The Setup wizard does not deploy the default cubes that are included with Microsoft Dynamics AX 2012. To deploy the cubes, you must run the Analysis Services Project wizard or use Windows PowerShell.

The Analysis Services Prng 0 &Zi3 been added

The Analysis Services Project wizard has been added to Microsoft Dynamics AX 2012. This wizard helps you complete the following tasks:
  •     Deploy the default cubes that are included with Microsoft Dynamics AX.
  •     Configure an Analysis Services project after you disable a Microsoft Dynamics AX configuration key.
  •     Update an existing Analysis Services project.
  •     Create a new, custom Analysis Services project.
Windows PowerShell commands have been added

If you are using Microsoft Dynamics AX 2012 R2, you can use Windows PowerShell commands to deploy the default cubes that are included with Microsoft Dynamics AX.

Upgrade information


The instructions for upgrading the cubes differ based on the version of Microsoft Dynamics AX that you are upgrading from.

  • If you are upgrading from Microsoft Dynamics AX 2009 to any version of Microsoft Dynamics AX 2012 – When you upgrade, you must create new cubes to display the information that your old cubes displayed.
  • If you are upgrading from the initial release of Microsoft Dynamics AX 2012 or Microsoft Dynamics AX 2012 Feature Pack to Microsoft Dynamics AX 2012 R2 – When you upgrade to Microsoft Dynamics AX 2012 R2, use the Analysis Services Project wizard to upgrade the cubes.

New default cubes


Microsoft Dynamics AX provides cubes you can use to analyze your business data. The cubes that are available to you depend on the version of Microsoft Dynamics AX 2012 that you are using.

The following cubes are included with the initial release of Microsoft Dynamics AX 2012 and Microsoft Dynamics AX 2012 Feature Pack:
  • Accounts payable cube
  • Accounts receivable cube
  • Customer relationship management
  • Environmental sustainability cube (new in the initial release of Microsoft Dynamics AX 2012)
  • Expense management cube
  • General ledger cube
  • Production cube
  • Project accounting cube
  • Purchase cube
  • Sales cube
  • Workflow cube (new in the initial release of Microsoft Dynamics AX 2012)
The following cubes are included with Microsoft Dynamics AX 2012 R2:
  • Accounts payable cube
  • Accounts receivable cube
  • Budget control cube (new in Microsoft Dynamics AX 2012 R2)
  • Budget plan cube (new in Microsoft Dynamics AX 2012 R2)
  • Environmental sustainability cube
  • Expense management cube
  • General ledger cube
  • Inventory value cube (new in Microsoft Dynamics AX 2012 R2)
  • Production cube
  • Profit tax totals cube (new in Microsoft Dynamics AX 2012 R2)
  • Project accounting cube
  • Purchase cube
  • Retail cube (new in Microsoft Dynamics AX 2012 R2)
  • Sales and marketing cube (new in Microsoft Dynamics AX 2012 R2)
  • Sales cube
  • Workflow cube

Configuration of cubes


The default cubes that are included with Microsoft Dynamics AX require that you enable all configuration keys. In Microsoft Dynamics AX 2009, if you disabled a configuration key, you had to manually update your Analysis Services project in SQL Server Business Intelligence Development Studio. During this update, you removed the measures, dimensions, and key performance indicators (KPIs) that were no longer available (because the configuration key was disabled).

In Microsoft Dynamics AX 2012, if you disable a configuration key, you must complete the following tasks:
  1. Run the Analysis Services Project wizard to remove the measures, dimensions, and KPIs that are no longer available.
  2. Modify or remove the reports that require the configuration key.

Date dimensions


In Microsoft Dynamics AX 2012, you can add date dimensions to your cubes. Therefore, you can now examine the data in a cube by using different time periods, such as months, quarters, or weeks.

To add date dimensions to your cubes, follow these steps:
  1. Use the Date dimensions form to specify the date dimensions by which you want to examine the data in a cube.
  2. Run the Analysis Services Project wizard to add the date dimensions to your cube.

Support for data partitions


A Microsoft Dynamics AX 2012 R2 installation may consist of multiple data partitions. You must deploy cubes for each partition in your installation.

For example, suppose that you have two partitions: Partition 1 and Partition 2. To deploy the cubes that are included with Microsoft Dynamics AX for both of these partitions, follow these steps:
  1. Start the Analysis Services Project wizard.
  2. Select the default Analysis Services project, which is named Dynamics AX.
  3. Deploy the project for each partition in your installation by selecting the partitions. In this example, you would select Partition 1 and Partition 2.
  4. Complete the wizard.
  5. Open SQL Server Management Studio and connect to the Analysis Services instance. Notice that there is now a database (and cubes) for each partition.

Improvements to the Business Overview web part


Business Overview web parts, which are used on Role Center pages, can display financial indicators or key performance indicators (KPIs).
  • A financial indicator is a data calculation across various time periods. An indicator represents a measure in an online analytical processing (OLAP) cube.
  • A KPI is a business metric, such as the total revenue, gross profit margin, or current ratio. A KPI can help you track your organization’s progress toward a performance goal.
The following enhancements have been made to the way that you display indicators and KPIs in the Business Overview web part in Microsoft Dynamics AX 2012 R2.

You can apply multiple filters to indicators and KPIs


Suppose that you have selected to display your organization’s sales total. You can filter this KPI so that it displays only the sales that were made in 2012 by a specific salesperson. In this case, the filters resemble the following filters:
  • Filter 1: Year = 2012
  • Filter 2: Salesperson Name = Kim Ackers
You can filter by relative dates or actual values

Suppose that you have selected to display your organization’s sales total. If you want to filter this KPI by a relative date, you can display only the sales that were made last year, last month, or last quarter. If you want to filter this KPI by an actual value, you can display only the sales where Year = 2012.

You can split the data

You can display the individual elements that the whole indicator or KPI is made of. For example, suppose that you have selected to display your organization’s sales total. You can split the sales total by salesperson to display the sales totals of all salespeople, or you can split the sales total by region to display the sales totals of each region.

You can also filter the list of elements. For example, you can display only the top 10 salespeople or the 10 regions where the fewest sales were made. Alternatively, you can filter out the regions where no sales occurred.

You can link to menu items or URLs

You can format the name of the indicator or KPI as a hyperlink. The hyperlink can direct users to the following items:
  • Microsoft Dynamics AX client menu item
  • Enterprise Portal menu item
  • URL
My above blog is based on Microsoft's Official information.
 
I hope this blog about 'Microsoft Dynamics AX 2012 - What's New: Analytics for IT Professionals' was informative. Please feel free to leave your comments.

Microsoft Dynamics AX 2012 - What's New: X++ for Developers

This topic describes the new and enhanced X++ features that are available in Microsoft Dynamics AX 2012.

What is new or changed?

  • .NET Proxies to X++ Classes
What can you do?:
    Create proxy classes to represent .NET interop to X++.   

Microsoft Dynamics AX 2009:

    The feature was not supported.

Microsoft Dynamics AX 2012:
    A .NET proxy is a .NET managed class that represents a class or table that exists in Microsoft Dynamics AX. Your managed program can call proxy methods, just as your X++ code can call methods on a table or class.

The C# compiler detects errors in your calls to the proxy at compile time. You can use this early-bound programming model to fix errors in your code before the code is run. The internal logic of the proxy class uses the late-bound programming model of .NET Business Connector. However, the tools that automatically generate the source code of the proxy have been rigorously tested.

Why is this important?:

    Proxy classes enable you to write managed classes that interoperate with your X++ classes, to form a unified application.
  • X++ Attributes
What can you do?:
    Use X++ attribute classes for metadata.

Microsoft Dynamics AX 2009:
    The feature was not supported.

Microsoft Dynamics AX 2012:
    X++ classes and methods can now have metadata in the form of attribute classes. An attribute class is any non-abstract class that inherits from the SysAttribute class. Detailed metadata is assigned through the constructor of the attribute class.

Tables and interfaces can also have attribute classes.

Why is this important?:
    By using attributes, you can associate declarative information with X++ code. After an attribute is associated with a program entity, the attribute can be queried at run time and used in many ways.
  • New Expression Operators in X++ for Inheritance
What can you do?:
    Use the is operator to test whether X++ objects are a type or a subtype of a specific class.

Microsoft Dynamics AX 2009:
    The feature was not supported.

Microsoft Dynamics AX 2012:
    The X++ language now has the expression operator is. You use the is operator to test whether an object is a type or a subtype of a specific class or table.

Why is this important?:
    When the is operator is used, your code can test whether a particular downcast assignment would be valid.


What can you do?:
    Use the as operator to make downcast assignments explicit.

Microsoft Dynamics AX 2009:
    The feature was not supported.

In Microsoft Dynamics AX 2009, downcast assignments were implicit. Flawed X++ code sometimes assigned an object to a variable type that was outside the inheritance hierarchy of the object. This incorrect assignment sometimes caused confusing errors during run time.

Microsoft Dynamics AX 2012:
    You can use the as operator to make downcast assignments explicit.

Why is this important?:
    When the as operator is used to make a downcast assignment explicit, the incorrect assignment of the object is prevented during run time. The null value is assigned instead. Therefore, it is easier to diagnose the run-time error.
  • Events in X++
What can you do?:
    Implement events and event handling in X++.

Microsoft Dynamics AX 2009:
    The feature was not supported.

Microsoft Dynamics AX 2012:
    The X++ language now has the delegate keyword. When program conditions meet the programmer's criteria for the event, the X++ code can call the delegate. The delegate then calls all the event handler methods that were subscribed to the delegate.

The members of a class can include both methods and delegates.

You can subscribe methods to a delegate by dragging the methods onto the node for the delegate in the Application Object Tree (AOT). Alternatively, you can subscribe methods to the delegate in X++ code by using the += operator together with the eventHandler keyword.

An X++ event can be handled by event handler methods that are written in either X++ or managed languages such as C#.

Why is this important?:
    The event programming model can reduce the chance that your customizations are affected by upgrades to your program or to Microsoft Dynamics AX.


What can you do?:
    Pre-method and post-method events are generated by the system.

Microsoft Dynamics AX 2009:
    The feature was not supported.

Microsoft Dynamics AX 2012:
    The methods on your X++ class each raise an event immediately before they start. The methods raise another event immediately after they end. These two events offer opportunities for custom code to intervene in the program flow.

The pre-method event handler can modify the parameter values before the values are passed to the method. Before the caller of the method receives the value that is returned by the method, the post-method event handler can modify the return value.

The CalledWhen property of each event handler in the AOT Properties window makes it easy to choose between a subscription to the Pre or Post event of the method.

Why is this important?:
    The pre-method and post-method events are stable points at which custom code can run.
  • X++ Compiled to .NET CIL is Faster
What can you do?:
    Speed up X++ batch jobs.

Microsoft Dynamics AX 2009:
    The feature was not supported.

Microsoft Dynamics AX 2012:
    Some X++ batch jobs can now complete in much less time. All X++ code that runs on the AX32.exe client still runs as interpreted p-code. However, all batch jobs now run as Microsoft .NET Framework CIL, which is often much faster than p-code.

The X++ developer must now complete the extra step of compiling X++ p-code to CIL. To compile p-code to CIL, right-click AOT, and then click Add-ins > Incremental CIL generation from X++.

Next, if the installation uses multiple instances of Application Object Server (AOS), all AOS instances must be stopped and then restarted. This causes the AOS instances to load the updated assembly.

Finally, a service or a batch job must run the X++ code that was compiled to CIL. Services and batch jobs now run only as CIL.

Why is this important?:
    Some batch jobs run much faster as CIL than they did as p-code.

My above blog is based on Microsoft's Official information.
 
I hope this blog about 'Microsoft Dynamics AX 2012 - What's New: X++ for Developers' was informative. Please feel free to leave your comments.

Thursday 8 November 2012

Microsoft Dynamics AX 2012 - What's New: Analytics for Developers

This topic describes the changes to the Online Analytical Processing (OLAP) framework in Microsoft Dynamics AX 2012.

Analytics


Microsoft Dynamics AX provides a model driven approach for developing Business Intelligence (BI) applications that use the SQL Server Business Intelligence Development Studio (BIDS) development environment. Microsoft SQL Server Analysis Services provides OLAP functionality.

  • What is New or Changed?
You can use Microsoft Dynamics AX views to model data in perspectives.

The Analysis Services project wizard is introduced to make it easier to create, update, configure, and deploy Analysis Services projects. The wizard performs many of the tasks that you would otherwise need to perform manually in BIDS.

You can create Gregorian calendars to use as date dimensions in your Analysis Services project.

  • Microsoft Dynamics AX View Support in Perspectives
What can you do?:
    Model data in perspectives.

Microsoft Dynamics AX 2009:
    Use tables to model data in perspectives. Use custom query definitions to perform the following tasks:
  1. Join tables with complex join conditions.
  2. Reduce the scope of tables.
  3. Create measures or dimension attributes using calculated fields.
Microsoft Dynamics AX 2012:
    Use tables and views to model data in perspectives.

Why is this important?:
    Modeling data using views and tables makes it easier to customize cubes.

  • Analysis Services Project Wizard
What can you do?:
    Deploy default cubes.

Microsoft Dynamics AX 2009:
    Initially deploy the default cubes by using the Setup wizard.

Microsoft Dynamics AX 2012:
    Use the Analysis Services project wizard to deploy an existing Analysis Services project. Choose the default cubes from the AOT.

Why is this important?:
    It is easier to deploy the default cubes.

  
What can you do?:
    Configure an Analysis Services project after you change the Microsoft Dynamics AX configuration.

Microsoft Dynamics AX 2009:
    Manually update your Analysis Services project in BIDS to remove measures, dimensions, and KPIs that you do not have access to according to the license and configuration keys in Microsoft Dynamics AX.

Microsoft Dynamics AX 2012:
    Use the Analysis Services project wizard to remove measures, dimensions, and KPIs that you do not have access to according to the license and configuration keys in Microsoft Dynamics AX.

Why is this important?:
    It is easier to update Analysis Services projects after you change the Microsoft Dynamics AX configuration.


What can you do?:
    Update an existing Analysis Services project.

Microsoft Dynamics AX 2009:
    Use the Update a Business Intelligence project form.

Microsoft Dynamics AX 2012:
    Use the Analysis Services project wizard to update an Analysis Services project to do the following:
  1. Add or remove dimensions.
  2. Add, remove, or update calendars to use as Date dimensions.
  3. Add or remove label translations.
  4. Add or remove currency conversion.
Why is this important?:
    It is easier to update an existing Analysis Services project.


What can you do?:
    Create a new Analysis Services project.

Microsoft Dynamics AX 2009:
    Use the Update a Business Intelligence project form.

Microsoft Dynamics AX 2012:
    Use the Analysis Services project wizard to create an Analysis Services project.

Why is this important?:
    It is easier to create a new Analysis Services project.

  • Date Dimensions using Gregorian Calendars
What can you do?:
    Add date dimensions to cubes.

Microsoft Dynamics AX 2009:
    Date dimensions are not available in Microsoft Dynamics AX 2009. Use a system time dimension instead.
 
Microsoft Dynamics AX 2012:
    Define Gregorian calendars in the Date dimensions form in Microsoft Dynamics AX that you can use as Date dimensions in your Analysis Services project.

Why is this important?:

    The limitations of using the server time dimension in Microsoft Dynamics AX 2009 are as follows:
  1. By default, only one Gregorian calendar can be included in the Analysis Services project.
  2. Date attributes cannot be translated to Microsoft Dynamics AX languages.
  3. You can only use attributes from SQL Server Analysis Services.
  4. Null dates (1/1/1900) are not available.

My above blog is based on Microsoft's Official information.
 
I hope this blog about 'Microsoft Dynamics AX 2012 - What's New: Analytics for Developers' was informative. Please feel free to leave your comments.