Default and Site-specific Order Settings in Microsoft Dynamics AX 2012
In this article, you'll learn how default order settings and site specific order settings are stored in Microsoft Dynamics AX 2012. The method of storage is often confusing because the two sets of order settings are stored in three different tables.
The three tables are segregated by module (Purchase, Inventory, Sales), but each of the module-specific tables stores both default and site specific order settings.
1. Released product default order settings
Order settings are defined for products in the Released product details form, under the Manage Inventory action pane tab.
Released product details> Manage inventory> Default order settings (form EcoResProductDetailsExtended):
Figure 1 - Displays Default order settings (form InventItemOrderSetup):
The default order settings are stored in three tables, one each for the Purchase, Inventory and Sales modules. In these three setup tables, the default order settings are stored by itemId and always have the InventDimId field set to “AllBlank”. The three records below (Table 1) correspond to the screenshot shown above (Figure 2):
Table 1: Default order settings as stored in AX tables
In summary, an item’s default order settings are stored in three tables, one record per table, with the table field InventDimId always equal to AllBlank.
2. Released product site specific order settings
Released product details> Manage inventory> Site specific order settings (form EcoResProductDetailsExtended):
Figure 3 - Displays Site specific order settings (form InventItemOrderSetup)
Figure 4 - Note this is the same form as that used for maintaining default order settings.
Users should maintain one record for each site defined in the default order settings for the item. In this example, since we have one site for purchasing, and a second site for inventory and sales, there will be two sites defined under site specific order settings.
For each site, under the general tab, users will define the default warehouse (or leave blank).
Figure 5 - OFFSITE settings
Note that the warehouse field can be left blank. In this example, since this site is only used for receiving, only the purchase warehouse is defined for the OFFSITE site.
For the ROL site, both inventory and sales warehouses will be defined, but the purchase warehouse can be left blank.
Figure 6 - ROL site settings
Here is how the data is defined in the tables. Note here that InventDimId will always be set to the site being maintained, and the InventDimIdDefault field will correspond to the warehouse (or be blank if not used for the site).
Table 2: Site specific order settings as stored in AX tables (as displayed in figures 5 and 6 above
Note: for InventDimId and InventDimIdDefault fields, a null value is not the same as the AllBlank value.
In summary, an item’s site specific order settings are stored in three tables (the same tables as used for default order settings), one record per site per table, with the table field InventDimId always equal to the site’s InventDimId.
3. InventDimIds and the InventDim table
In the Table 1 and Table 2 shown earlier, each field value in the columns “InventDimId” and “InventDimIdDefault” is a key valued in the Inventory dimensions table, InventDim.
Figure 7 - InventDim table values
Each value specified for either Site or Warehouse in the default settings will exist in the InventDim table. Notice that each InventDimId used in default settings corresponds to either a specific Site or a specific Warehouse (Site = InventSiteId, Warehouse = InventLocationId). The order setting tables do not specify InventDimId for the combination of site and warehouse.
4. The order defaults in sales order entry
One use of order defaults is to set the initial values for site and warehouse on sales order lines. Figure 8 shows a newly added sales order line where the site and warehouse values are populated based on the default and site specific order settings (sales) for this item.
The SalesLine record shown above has an InventDimId associated which keys to the InventDim record for the combination of Site and Warehouse shown on the Sales order form (Figure 8). In this example, the InventDimId is “ROL-000091”, which can be seen in Figure 7 above.
For site specific records, the warehouse referred to in InventDimIdDefault is for the InventDim record of the warehouse only, not site/warehouse combination. So when working with the records programmatically, you would need to create an InventDim record with the site and warehouse values combined into a third InventDim buffer, and use that buffer to lookup InventDimId for the combination of site and warehouse.
Here is an example of how the sales order line defaults would be found:
Given InventDim1, with InventDimId = “ROL-000021” (this is for InventDim1.InventSiteId = “ROL”);
And given InventDim2, with InventDimId = “ROL-000084” (this is for InventDim2.InventLocationId = “FG”);
Create buffer InventDimTmp, with InventDimTmp.InventSiteId = InventDim1.InventSiteId and InventDimTmp.InventLocationId = InventDim2.InventLocationId
Create buffer InventDim3 = InventDim::findOrCreate(InventDimTmp).
InventDim3.InventDimId will be returned as “ROL-000091”, for the combination of Site/Warehouse on the sales order line.
For more information other topics in Dynamics AX contact us today.
Time to upgrade your Microsoft investment? If your company is using Microsoft Dynamics AX – whether it’s 4.0, 2009, or 2012 – chances are you’ve already researched your options for upgrading to Microsoft Dynamics 365 for Finance and Operations. Read this guide to learn the top 4 reasons to upgrade NOW, and how to do it in the least disruptive manner.