IT tutorials
 
Applications Server
 

Customizing Dynamics AX 2009 : Table and Class Customization (part 1) - Creating New Dimension Types

1/28/2012 5:59:03 PM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
By default, Dynamics AX 2009 comes with nine default inventory dimensions. (The user can define additional inventory dimensions.) Dimensions describe the characteristics of items or item lots. Item dimensions might include characteristics such as configuration, model, and size. Item lots might have storage dimensions, such as site, warehouse, location, or pallet, or they might be identified by a serial number and batch number. The site dimension is new in Dynamics AX 2009.

The following customization scenario describes how to customize tables and classes used by the inventory dimension feature to implement two new item dimensions that describe a specific bicycle configuration: frame size and wheel size. This description isn’t an exhaustive list of elements that you must change; instead, it offers guidelines for finding the elements necessary to customize the full implementation of a new inventory dimension.

Creating New Dimension Types

When implementing new inventory dimensions, your first task is to create extended data types for each of the dimensions. Doing so provides the following benefits:

  • To apply the inventory dimensions to multiple tables, you define the type just once and then apply it to each table.

  • The Label property, the HelpText property, and a few constraints can be defined on the data type, ensuring consistent behavior and appearance of fields of the same type.

  • If the type is declared as a parameter or a return type for a method, you can declare variables of the type in X++ code to optimize IntelliSense responsiveness and to improve the readability of the code.

This scenario defines a table in which a field of the specific type is part of the primary key. You can define the relationship to this table on the extended data type and subsequently instruct the application runtime to provide lookups and Go To The Main Table Form support.

In this example, you enter the Data Dictionary in the Application Object Tree (AOT) and create a BikeFrameSize extended data type and a BikeWheelSize extended data type. Table 1 lists the property settings that deviate from the default settings.

Table 1. BikeFrameSize and BikeWheelSize Property Settings
PropertyBikeFrameSizeBikeWheelSize
TypeRealReal
LabelFrame sizeWheel size
HelpTextFrame size in inchesWheel size in inches
AllowNegativeNoNo
ShowZeroNoNo
NoOfDecimals00

Figure 1 shows the property sheet for the BikeFrameSize extended data type, accessible by clicking Properties on the context menu for the type.

Figure 1. Property sheet for the BikeFrameSize extended data type



Next, create two tables, named BikeFrameSizeTable and BikeWheelSizeTable, in which the frame and wheel sizes for each item can be stored. In addition to the specific inventory dimension types, the tables also contain an ItemId field and a Name field. The ItemId and dimension in each table constitute the table’s primary index.

Table 2 lists the BikeFrameSizeTable property settings that deviate from the default settings. (The property settings for BikeWheelSizeTable are identical except for the BikeWheelSize field and its extended property type.)

Table 2. Field Property Settings
PropertyItemIdBikeFrameSizeName
TypeStringRealString
ExtendedDataTypeItemIdBikeFrameSizeName
MandatoryYesYesNo (default)
AllowEditNoNoYes (default)

Create a unique index on both tables. For BikeFrameSizeTable, name the index FrameIdx and make it contain the ItemId field and the BikeFrameSize field. For BikeWheelSizeTable, name the index WheelIdx and make it contain the ItemId field and the BikeWheelSize field. Declare the indexes as the PrimaryIndex on the respective tables. In the AOT, the fields and the indexes appear as shown in Figure 2.

Figure 2. BikeFrameSizeTable definition


In addition to the fields and index shown in Figure 2, you should also set properties in the tables for caching, form references, and so on, and the table should contain field groups and methods for checking the validity of the fields. The Microsoft Dynamics AX 2009 software development kit (SDK) contains guidelines and best practices for creating tables.

After you define the tables, you should update the extended data types to reflect their relationship to the individual tables, as shown in Figure 3.

Figure 3. Extended data type relations of BikeFrameSize


This relationship instructs the Dynamics AX runtime to provide lookup and Go To The Main Table Form functionality when fields of these types appear on forms. The application runtime uses the related table as the data source for the lookup form and also to find the main table form from the FormRef property on the table. You must therefore create forms for the BikeFrameSizeTable and BikeWheelSizeTable tables and menu items to open the forms. These menu items are added to the FormRef properties on the corresponding tables. You could design the forms to mirror the form shown in Figure 4. See the Microsoft Dynamics AX 2009 SDK for general information on designing forms.

Figure 4. Frame Sizes form

 
Others
 
- BizTalk 2009 : Pipeline Component Best Practices and Examples - Using BizTalk Streams
- BizTalk 2009 : Pipeline Component Best Practices and Examples - Creating Documents
- Installing Exchange Server 2010 : Check the Exchange installation & Installing dedicated server roles
- Installing Exchange Server 2010 : Unattended setup
- Microsoft Dynamic GP 2010 : Harnessing the Power of SmartLists - Renaming Fields for clarity
- Microsoft Dynamic GP 2010 : Controlling access by sharing or restricting SmartList Favorites
- Sharepoint 2007 : Determine Whether a Site Is WSS or MOSS
- Sharepoint 2007 : Navigate Through a SharePoint Site - Navigate Through a SharePoint Site
- Sharepoint 2007 : Change My Regional Settings
- Designing Active Directory for Exchange Server 2007 & Determining Hardware and Software Components
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us