Microsoft Dynamics Ax 2012 Custom financial dimensions Lookup

There was a requirement to create a new field on a table that should be populated from a custom financial dimension values and need to show a lookup on the data entry form for this field that will populates the data from your custom financial dimension.

First need to identify the relevant tables that are needed to fulfill this requirement:

  • DimensionFinancialTag
  • DimensionAttribute
  • DimensionAttributeDirCategory
  • FinancialTagCategory

The list of values for custom dimension are stored in the table DimensionFinancialTag. But this table stores custom values for all custom financial dimensions. To determine which of the records to filter out and show we will have to apply a filter on the field FinancialTagCategory. How do we figure out the FinancialTagCategory value? We do that by traversing from the DimensionAttribute table (hold a records for your financial dimension).

The table DimensionAttributeDirCategory holds a link between DimensionAttribute and FinancialTagCategory, this table is used to retrieve the financialtagcategory and filter the records in the table DimensionFinancialTag.

Following is the Sample Code:

static void MyCustomFinancialDimensionLookup(Args _args)
SysTableLookup                      sysTableLookup;
Query                               query;
QueryBuildDataSource                qbdsDimensionFinancialTag;
QueryBuildRange                     qbrFinancialTagCategory;


query = new Query();
qbdsDimensionFinancialTag = query.addDataSource(tableNum(DimensionFinancialTag));
qbrFinancialTagCategory = qbdsDimensionFinancialTag.addRange(fieldNum(DimensionFinancialTag, FinancialTagCategory));
qbrFinancialTagCategory.value(strFmt(‘%1’, DimensionAttribute::findByName(MyCustomFinancialDimension, false).financialTagCategory()));

sysTableLookup = sysTableLookup::newParameters(tableNum(DimensionFinancialTag), this);
sysTableLookup.addLookupfield(fieldNum(DimensionFinancialTag, Value), true);
sysTableLookup.addLookupfield(fieldNum(DimensionFinancialTag, Description));
sysTableLookup.addSelectionField(fieldNum(DimensionFinancialTag, FinancialTagCategory));


Microsoft Dynamics Ax 2012 Inbound port using File system Adapter Error: Duplicate message. Message has already been processed

Yesterday we get the following error during import of XML File containing message ids.

“Event Description: Object Server 01: An error has occurred in the services framework. Method: AifMessageInspector::AfterReceiveRequest. Error: System.ServiceModel.FaultException`1[Microsoft.Dynamics.Ax.Services.AifFault]: Duplicate message. Message has already been processed. (Fault Detail is equal to Microsoft.Dynamics.Ax.Services.AifFault).”


XML File contain the message ID’s that were already imported to system.


By updating the Message ID’s that were already imported to the system and run the import process it work fine.

Following is the example work around that has been done to fix the issue:

Change the message id value at the end of id. From Message ID.


To message ID:


The Basic Rules of a Successful Supply Chain

Supply Chain

The Supply Chain is the process through which a company creates and distributes its products and services to the end user. It includes a number of specific elements; production planning, material sourcing, transportation management, warehouse management and demand management. These functions are tightly integrated to provide the products and services to the end user in an efficient, timely and profitable manner. It is important to continually monitor your supply chain with following principles.

  • Demand triggers must be identified as quickly as possible
    • There is no doubt that getting the right part to the right place at the right time – as quickly as possible – is the #1 priority of a supply chain.
    • This requires that at any given time you have enough of the right parts in your supply chain. In order to assure this occurs, many supply chains err on the side of caution, having too many of every part. In many cases, far too many. To understand why, we must look at how stock arrives in a supply chain in the first place. Stock exists in a supply chain for any or all of these three reasons:
      • It is the most economical way to move materials from point A to point B (and points C and D and E)
      • The variable nature of supply, in terms of late delivery, quality failure rates, etc.
      • The variable nature of demand, both in timing and quantities.
  • Make sure the person who is supposed to take action acknowledges and confirms this requirement.
    • Everyone in the direct line from supply to usage should know that the triggered event has a) taken place and b) been acknowledged by the person responsible for making sure that any next steps are set in motion.
  • Everything needs to remain in context.
    • Each time a trigger occurs – or data is collected – your supply chain should include a mechanism for answering the following question: is this a ‘normal’ event, an ‘extraordinary’ one, or something in between?
  • Mechanisms for clarification are critical.
    • There needs to exist a way for the supplier to ask the direct line customer and  their customer(s) to explain, as in case of unusually early trigger. This can be as simple as an e-mail from the supplier or as robust as a shared portal.
    • Without the opportunity for clarification, most suppliers will err on the side of ‘just in case’, meaning they will select the possibility that results in extra stock
    • just in case, which puts us back where we started
  • Task individuals, not committees.
    • A supplier has queried its customer about an abnormally early order for a small batch of parts. How? The supplier sent an e-mail. So far so good? Not quite. The e-mail was sent to all five people in charge of that portion of the supply chain. Each assumed someone else would respond and, well, with so many other things going on, the clarification request was lost in the shuffle. The supplier assumed that no additional effort was required. Unfortunately, the abnormally early order was the first trigger for an increase in production. More ‘abnormal’ triggers start coming in and shortages appear throughout the chain.                                                                 The solution here is to make sure that one person, not a committee, is tasked with replying to a discrete list of suppliers and/or portions of the chain. Others can and should be included for technical assistance, input, backup, etc. but no more than one person should be accountable for assuring that replies are sent within a predetermined period of time, dependent on the priority level of the request and/or component.
  • Group similar tasks, not just similar priorities.
    • Once parts are manufactured, we need to find the best combination to:
      • The fastest way to move the parts.
      • The lowest cost to move the parts.
      • The lowest cost to store the parts.
  • Evaluate risk in threes: the forecast, the demand data, and
    the understanding that forecasts are skewed by previous bad

    • A stock-out can be a very expensive event, so it’s always important to err on the side of having a few too many of a needed item instead of cutting the need too close. But how many is too many? And how close is too close? We all know this but what is less obvious is how we can best assess the likelihood of the stock-out or shortage and find a level of confidence that balances the risk. For this we will need to see both sides of the equation:
      • The forecast data – showing how many of each item we anticipate needing, and any mitigating future factors, such as ramped up or decreased orders.
      • The historical (pull) data – showing how fast we are using the supplied parts and how closely the actual usage matches the forecasted usage.
  • Motivation should be a foundation, not an afterthought
    • Before we implement any change – whether it’s an upgrade, a new technology, or even the elimination of a step in the process – we must keep in mind that people, not technology or spreadsheets, make up the backbone of every supply chain.
    • People, unlike machines and materials, require motivation to function at their best.
  • Don’t reward bad suppliers with increased orders.
    • No discussion on motivation within the supply chain can be complete without one of the classic examples of negative motivation: buying more stock from suppliers with poor delivery histories.
    • The reason for this is clear. To buffer yourself against their unreliable supply you add more stock, thus rewarding the supplier’s poor performance with larger orders. Conversely, the good suppliers are punished for their reliable performance with smaller orders, shorter lead times, and, most likely, smaller profits.
  • The more things change, the more things need to be able
    to change.

    • A successful supply chain should not be static but always adapting to the changes in the business. A supply chain should be a source of opportunity, not a constraint.

Microsoft Dynamics AX 2012 R3 New Features – Warehouse management

In previous article we have covered the several features that are added or changed in Microsoft Dynamics AX 2012 R3 Transportation management.

In this article we will cover the Warehouse management:

In Microsoft Dynamics AX Warehouse management can be used to monitor and automate warehouse processes. The Warehouse management module for Microsoft Dynamics AX 2012 R3 lets you manage warehouse processes in manufacturing, distribution, and retail companies. For example, you can use the features in this module to complete tasks in the following areas.

Following are the features are added to Dynamics AX 2012 R3:

  • Workflows – Configure inbound and outbound intelligent workflows.
  • Picking and packing – Assign orders to clusters to pick from a single location and configure profiles to control the validation and packing of items into shipping containers. Alternate between picking strategies for batch and non-batch items.
  • Wave processing – Create, implement, and release work using batch-scheduled or manual processing of waves.
  • Inventory counting – Set up cycle counting thresholds, create cycle counting plans, schedule plans, and cycle count locations and items ad hoc.
  • Containerization – Set up container groups to order the sequence of the packing process and create templates to support packing strategies.
  • Mobile devices – Use scanners or other mobile devices to optimize precision in the picking and put-away processes.

How to migrate RDP Base Class to Pre-process RDP Microsoft Dynamics AX 2012

Report Data Provider.

An RDP class is an X++ class that is used to access and process data for a Reporting Services report. The options for a data source type for a Microsoft Dynamics AX report are query, business logic, and RDP. An RDP class is an appropriate data source type when the following conditions are met.

  1. You cannot query directly for the data you want to render on a report.
  2. The data to be processed and displayed is from Microsoft Dynamics AX.

Preprocessing reports

SSRS uses the WCF (Windows Communication Foundation) to connect to the AOS for data access. This connection has a threshold limit and it might fail if a report takes a long time to execute. The report server execution waits for the RDP to process the data and return it. In the event where the RDP takes too long a time to execute the reporting, the service might fail. Preprocessing is a strategy to beat this issue. This recipe will help you understand how to enable preprocessing for any RDP report

How to do it

When a report processes a huge amount of data or is found to take considerable time during the execution, then you can decide to incorporate preprocessing. Follow these steps to enable preprocessing.

  1. Modify RDP base class:  SRSReportDataProviderBase -> SRSReportDataProviderPreProcessTempDB
  2. Update table type:  InMemory -> TempDB
  3. Perform a full compile of IL
  4. Restart the AOS
  5. Introduce Controller class to run the report
  6. Update Output Menu Item:  Report -> Controller class