COURSE 80313
DEVELOPMENT IV
Last Revision: March 2012
This courseware is provided “as-is”. Information and views expressed in this courseware, including URL and other Internet Web site references, may change without notice.
Unless otherwise noted, the examples depicted herein are provided for illustration only and are fictitious. No real association or connection is intended or should be inferred.
This courseware does not provide you with any legal rights to any intellectual property in any Microsoft product. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this courseware may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means or for any purpose, without the express written permission of Microsoft Corporation.
Copyright © 2012 Microsoft Corporation. All rights reserved.
Microsoft®,MicrosoftDynamics®, Microsoft® PowerPoint®,Microsoft® SQL Server® data management software and Microsoft Dynamics® AX are trademarks of the Microsoft group of companies. All other trademarks are
property of their respective owners.
Introduction 0-1
Welcome ... 0-1 Microsoft Dynamics Courseware Contents ... 0-2 Documentation Conventions ... 0-3 Student Objectives ... 0-4Chapter 1: Number Sequences
1-1
Objectives ... 1-1 Introduction ... 1-1 Overview ... 1-2 Set Up and Administration ... 1-4 Extensibility Scenarios ... 1-10 Using Number Sequences in Forms ... 1-19 Lab 1.1 - Implement a New Number Sequence ... 1-22 Summary ... 1-31 Test Your Knowledge ... 1-32 Quick Interaction: Lessons Learned ... 1-33 Solutions ... 1-34
Chapter 2: Framework Features
2-1
Objectives ... 2-1 Introduction ... 2-1 Event Handlers for Customization ... 2-5 Integration with Microsoft Dynamics AX ... 2-16 Interop to X++ ... 2-23 Interop from X++ ... 2-30 Deploy .NET Assemblies for Interop ... 2-40 Summary ... 2-45 Test Your Knowledge ... 2-46 Quick Interaction: Lessons Learned ... 2-48 Solutions ... 2-49
Chapter 3: Application Foundation Features
3-1
Objectives ... 3-1 Introduction ... 3-1 Global Address Book ... 3-2 Extensible Data Security Policy Framework ... 3-12 Lab 3.1 - Extensible Data Security Policies ... 3-22 Financial Dimension Framework ... 3-25 Organization Model Framework ... 3-26 Case Management Framework ... 3-34 Lab 3.2 - Extend Case Management ... 3-44 Policy Framework ... 3-49 Summary ... 3-59 Test Your Knowledge ... 3-60
Chapter 4: Use and Design of the Ledger Module
4-1
Objectives ... 4-1 Introduction ... 4-1 General Ledger Overview ... 4-2 Chart of Accounts ... 4-8 Lab 4.1 - Create a System-Defined Dimension ... 4-22 Journals and Transactions ... 4-24 Lab 4.2 - Import Ledger Transactions ... 4-33 Budgeting Overview ... 4-39 Fixed Asset Overview ... 4-45 Summary ... 4-49 Test Your Knowledge ... 4-50 Quick Interaction: Lessons Learned ... 4-52 Solutions ... 4-53Chapter 5: Use and Design of the Product Information Management
Module 5-1
Objectives ... 5-1 Introduction ... 5-1 Products ... 5-2 Inventory Dimensions ... 5-13 Managing Inventory Policies ... 5-19 Lab 5.1 - Product Information Management Workshop ... 5-22 Summary ... 5-29 Test Your Knowledge ... 5-30 Quick Interaction: Lessons Learned ... 5-31 Solutions ... 5-32
Chapter 6: Use and Design of the Inventory and Warehouse
Management Module
6-1
Objectives ... 6-1 Introduction ... 6-1 Reservations and Marking ... 6-2 Inquiries and Transactions ... 6-3 Inventory Journals ... 6-13 Lab 6.1 - Import Beginning Balances ... 6-17 Quarantine and Quality Management... 6-29 Other Functionality ... 6-31 Lab 6.2 - Inventory Blocking ... 6-33 Summary ... 6-42
Chapter 7: Use and Design of the Accounts Receivable and Accounts
Payable Modules
7-1
Objectives ... 7-1 Introduction ... 7-1 Customers ... 7-2 Vendors ... 7-6 Free Text Invoices ... 7-9 Vendor Invoices ... 7-12 Payments ... 7-15 Lab 7.1 - Export Vendor Payments ... 7-25 Collections and Interest ... 7-31 Bills of Exchange ... 7-33 Promissory Notes ... 7-35 Lab 7.2 - Transfer Balances ... 7-37 Summary ... 7-39 Test Your Knowledge ... 7-40 Quick Interaction: Lessons Learned ... 7-42 Solutions ... 7-43Chapter 8: Use and Design of the Sales and Purchase Modules
8-1
Objectives ... 8-1 Introduction ... 8-2 Sales and Purchase Orders ... 8-2 Agreements ... 8-11 Charges ... 8-19 FormLetter Framework ... 8-23 Lab 8.1 - Add a Field to the Sales Invoice ... 8-37 Other Features ... 8-45 Summary ... 8-50 Test Your Knowledge ... 8-51 Quick Interaction: Lessons Learned ... 8-52 Solutions ... 8-53
Chapter 9: Use and Design of the Project Management and
Accounting Module
9-1
Objectives ... 9-1 Introduction ... 9-1 Projects ... 9-3 Work Breakdown Structure ... 9-9 Journals and Transactions ... 9-11 Lab 9.1 - Warranty Item ... 9-17 Budgets and Forecasting ... 9-21 Project Contracts ... 9-27 Invoicing ... 9-29 Lab 9.2 - Put an Invoice Proposal on Hold ... 9-32
Quick Interaction: Lessons Learned ... 9-42 Solutions ... 9-43
Chapter 10: Use and Design of the Production Control Module
10-1
Objectives ... 10-1 Introduction ... 10-1 Bill of Materials ... 10-3 Routes ... 10-8 Production Orders ... 10-11 Scheduling ... 10-26 Planned Production Orders ... 10-31 LEAN Manufacturing ... 10-33 Process Industries ... 10-37 Lab 10.1 - Bill of Material ... 10-39 Summary ... 10-42 Test Your Knowledge ... 10-43 Quick Interaction: Lessons Learned ... 10-44 Solutions ... 10-45
Chapter 11: Workflow
11-1
Objectives ... 11-1 Introduction ... 11-1 Line-Item Workflows ... 11-2 Workflow Providers ... 11-4 Work Item Queues ... 11-10 Currency in the Condition Editor... 11-16 Hierarchy Type Fields in the Condition Editor ... 11-22 Lab 11.1 - Workflow Workshop ... 11-25 Summary ... 11-37 Test Your Knowledge ... 11-38 Quick Interaction: Lessons Learned ... 11-40 Solutions ... 11-41Chapter 12: Reporting
12-1
Objectives ... 12-1 Introduction ... 12-1 Reporting Features Overview ... 12-2 Report Data Overview ... 12-4 Creating Basic Reports from a Query... 12-8 Lab 12.1 - Report Workshop ... 12-21 Create a Precision Design Report from a Report Data Provider ... 12-27
INTRODUCTION
Welcome
We know training is a vital component of retaining the value of your Microsoft Dynamics® AX 2012. investment. Our quality training from industry experts
keeps you up-to-date on your solution and helps you develop the skills necessary for fully maximizing the value of your solution. Whether you choose Online Training, Classroom Training, or Training Materials; there is a type of training to meet everyone's needs. Choose the training type that best suits you so you can stay ahead of the competition.
Online Training
Online Training delivers convenient, in-depth training to you in the comfort of your own home or office. Online training provides immediate access to training 24 hours-a-day. It is perfect for the customer who does not have the time or budget to travel. Our newest online training option, eCourses, combine the efficiency of online training with the in-depth product coverage of classroom training, with at least two weeks to complete each course.
Classroom Training
Classroom Training provides serious, in-depth learning through hands-on interaction. From demonstrations to presentations to classroom activities, you receive hands-on experience with instruction from our certified staff of experts. Regularly scheduled throughout North America, you can be sure you will find a class convenient for you.
Training Materials
Training Materials enable you to learn at your own pace, on your own time with information-packed training manuals. Our wide variety of training manuals feature an abundance of tips, tricks, and insights you can refer to again and again:
Microsoft Dynamics Courseware
The Microsoft Dynamics Courseware consists of detailed training manuals, designed from a training perspective. These manuals include advanced topics as well as training objectives, exercises, interactions and quizzes.
Look for a complete list of manuals available for purchase on the Microsoft Dynamics website: www.microsoft.com/Dynamics.
Microsoft Dynamics Courseware Contents
Test Your Skills
Within the Microsoft Dynamics Training Materials you find a variety of different exercises. These exercises are offered in three levels to accommodate the variety of knowledge and expertise of each student. We suggest you try the level three exercises first, if you need help completing the task look to the information in the level two exercises. If you need further assistance each step of the task is outlined in the level one exercise.
Challenge Yourself!
Level 3 exercises are the most challenging. These exercises are designed for the experienced student who requires little instruction to complete the required task.
Need a Little Help?
Level 2 exercises are designed to challenge students, while providing some assistance. These exercises do not provide step by step instructions, however, do provide you with helpful hints and more information to complete the exercise.
Step by Step
Level 1 exercises are geared towards new users who require detailed instructions and explanations to complete the exercise. Level 1 exercises guide you through the task, step by step, including navigation.
Quick Interaction: Lessons Learned
At the end of each chapter within the Microsoft Dynamics Training Material, you find a Quick Interaction: Lessons Learned page. This interaction is designed to provide the student with a moment to reflect on the material they have learned. By outlining three key points from the chapter, the student is maximizing knowledge retention, and providing themselves with an excellent resource for reviewing key points after class.
Documentation Conventions
The following conventions and icons are used throughout this documentation to help you quickly and effectively navigate through the information.
CAUTION: Cautions are found throughout the training manual and are preceded by
the word CAUTION in bold. Cautions are used to remind you of a specific result of a specific action which may be undesirable.
HINT: Hints are found throughout the training manual and are preceded by the word
HINT in bold. Hints are used to suggest time-saving features or alternative methods for accomplishing a specific task.
NOTE: Notes are found throughout the training manual and are preceded by the word
NOTE in bold. Notes are used to provide information which, while not critical, may be valuable to an end user.
BEYOND THE BASICS: Advanced information found throughout the training manual
is preceded by the words BEYOND THE BASICS in bold. Beyond the Basics provides additional detail, outside of standard functionality, that may help you to more optimally use the application.
EXAMPLE: Examples are found throughout the training manual and are preceded by
the word EXAMPLE in bold. Examples bring to light business scenarios that may better explain how an application can be used to address a business problem.
Student Objectives
What do you hope to learn by participating in this course? List three main objectives below.
1.
2.
CHAPTER 1: NUMBER SEQUENCES
Objectives
The objectives are:
• Describe the features of number sequences in Microsoft Dynamics®
AX 2012.
• Describe the steps for setting up and administering a number sequence.
• Develop new number sequences by extending the NumberSeqApplicationModule class.
• Use the Form Handler to create number sequences in a form.
Introduction
Number sequencing is a necessary feature in an Enterprise Resource Planning (ERP) system. Microsoft Dynamics AX uses 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.
This course is designed to explain how developers can perform customizations using the number sequence framework. However, administrators may be interested in the "Setup and Administration of Number Sequences" topic, which describes how to configure and set up number sequences using the new number sequence administration forms.
Overview
Microsoft Dynamics AX 2012 introduces two concepts to the number sequence framework: segment and scope. A segment, which is synonymous with
parameter, is a data entity such as a legal entity, operating unit, or fiscal calendar period that can be used to define a number sequence. In the enhanced number sequence framework, a number sequence can have more than one segment. A scope is a valid combination of segments used for a specific transaction or master data entity. By using segment and scope, Microsoft Dynamics AX 2012 extends the capabilities of the number sequence framework.
All segments in a scope must be related to the underlying transaction or master data entity. For example, a journal transaction will have a relationship with the segments of a legal entity and fiscal calendar period (through the transaction or posting date) that make up its scope. The scope can be used to partition the entity instances or transactions based on the segment values. In this example, a journal transaction might be partitioned into categories based on the two segments in its scope.
A unique number sequence code must be created for every possible combination of legal entity and fiscal calendar period instances. For example, if there are two legal entities with IDs 10 and 20, and there are fiscal calendar periods for every calendar month in 2011, the user must define separate number sequences for each combination. An example of a scope instance is 20-Jan11. An example of a number sequence code for a journal might be JN-J-20-Jan11, in which JN represents a journal. The number sequence format, J-20-Jan11, is a string that is defined by the end-user to represent the identifier for the transactions for legal entity 20 and fiscal calendar period January 2011. The actual instance of a journal might have a generated number sequence such as J-20-Jan11-000340. (The last number in the sequence, "000340," is a system-generated number.) The concept of a number sequence reference, which is synonymous with an
extended data type, is carried forward from Microsoft Dynamics® AX 2009.
When you create a number sequence, you must first create an extended data type (EDT) with a label-such as SalesOrderID-for the new number sequence. The label of this EDT is used as a reference. This reference is used to define a field on a document or master data entity that requires a number sequence.
Supported Scopes
Microsoft Dynamics AX 2012 will convert a subset of existing transactions and master data entities so they can use scopes such as a legal entity or global scope.
Microsoft Dynamics AX 2012 does not currently support an arbitrary
combination of segments as a valid scope. The following are the only scopes that are currently valid in the number sequence framework:
• DataArea (or company)
• DataArea and fiscal calendar period • Legal entity
• Operating unit
• Legal entity and fiscal calendar period • Legal entity and operating unit
TIP: Use the Legal entity scope when the underlying table does not include the DataAreaID field and has a foreign key to the legal entity table, CompanyInfo.
For example, use this scope for the number sequence for the expense report number that is in the expense report table, TrvExpTable.
Although the scope is predefined for a data entity, the segments within that scope are configurable. This means if a scope consists of a legal entity and fiscal calendar period, a user can decide to configure the scope to be only a legal entity during implementation. However, there are some mandatory restrictions on scope composition. If, for example, a fiscal calendar period is selected as part of a scope, the inclusion of DataArea or legal entity is mandatory in that scope. One limitation of the new number sequence framework is that the scope must always be configured for a specific reference. You cannot define a scope based on variations in the data. For example, suppose that the regulatory requirements in France and China require you to generate a number sequence by using the legal entity and fiscal calendar period segments. However, other countries or regions might not have the same requirements. The administrator in a
multinational corporation might decide that it is not necessary to include both segments for all countries or regions. However, you cannot define two different scopes—one to be used in France and China that includes legal entity and fiscal calendar period segments, and another to be used in all other countries or regions that includes only the legal entity segment. You could use the framework in such a way that all countries or regions have the scope of legal entity and fiscal calendar period, but display the number sequence format based on both segments only in France and China. However, the numbers generated would still be partitioned based on both segments in all companies.
A second limitation is that no references are provided out-of-the box that has a fiscal calendar period segment. Extending the framework to include a fiscal calendar period currently requires customization of existing parameters forms in specific modules. The new Number sequences setup form does support a fiscal calendar segment.
Set Up and Administration
When an end-user creates a document such as a sales order, purchase order, or invoice, the extended data type on the document field—such as SalesOrderID or InvoiceID—is passed to the number sequence framework. Additionally,
information is passed for the segments such as DataArea, or a legal entity plus fiscal calendar period, depending on the scope for the reference.
The framework then generates a number sequence code based on these parameters (segments), and this number sequence code is used to generate a number based on the format for the corresponding number sequence.
Specifying a number sequence is now done in two steps: segment configuration and setup.
With the Microsoft Dynamics AX 2012 number sequences framework, you can use multiple segments, but legacy number sequence references do not support this new capacity. Customers and partners who plan to perform customizations to enable new segments, based on the new capabilities of the framework, will have to use the Segment configuration form. This form can be used to view or modify the default configuration of segments included out of the box.
Segment Configuration
An administrator can configure the segments that are allowed for his or her requirements. For example, out of the box, the application could allow for two segments such as legal entity and fiscal calendar period. However, only the legal entity segment might be included by default. The administrator can enable both segments for their scenario by using the Segment configuration form.
In Microsoft Dynamics AX 2012, most references use either DataArea (or company) or legal entity segments out of the box. There are several references for master data entities that are shared across the application and do not use segments. However, the framework allows an administrator to add segments such as the fiscal calendar period.
To define the segment configuration, open Organization Administration >
Common > Number sequences > Segment configuration.
FIGURE 1.1 SEGMENT CONFIGURATION FORM
Most references use either Company or Legal entity scope segments. By default, references for master data entities that are shared across the application do not use scope segments.
NOTE: You cannot modify scope segments for a number sequence that is
currently being used. It is not sufficient to stop the use of number sequences with a scope segment that you need to modify. You must delete any number sequences that are based on the current configuration before you can modify the scope segments for a reference.
Set Up Number Sequences
The existing number sequences can be viewed by using the Number sequences list page. The navigation path to this page is Organization administration >
Common > Number sequences > Number sequences. The following figure
shows the Number sequences list page.
FIGURE 1.2 NUMBER SEQUENCES LIST PAGE
You can use the Area, Reference, and Company drop-down lists to filter the data that is displayed in the form.
TIP: The Company filter field only appears after you have selected an Area and
a Reference.
You can set up all required number sequences at the same time by using the Set
up number sequences wizard by clicking Generate in the New group of the
Action Pane, or you can create or modify individual number sequences by using the Number sequences form.
Procedure: Set Up Number Sequences by Using the
Wizard
You can use the Set up number sequences wizard to automatically create number sequences. The wizard generates number sequences for all references in all organizations for which number sequences are not yet defined. You cannot use the wizard to generate number sequences for a subset of the areas or references that require number sequences. You cannot use the wizard to modify existing number sequences. To use the wizard to set up number sequences, follow these steps.
• Open Organization administration > Common > Number
sequences > Number sequences. Then click Generate in the New
group of the Action Pane.
• On the Welcome page, click Next >.
• The Setup page is displayed. On this page, you can modify the
Identification code, the Lowest value, and the Highest value.
Additionally, you can indicate whether the number sequence must be
Continuous.
IMPORTANT: Do not select the Continuous option if you must preallocate
numbers for the number sequence.
• To add a scope segment to the format of a number sequence, select the format in the list, and then click Include scope in format. To remove a scope segment from the format of a number sequence, select the format in the list, and then click Remove scope from
format.
• To exclude a number sequence from automatic generation, select the number sequence in the list, and then click Delete.
• Click Next >.
• On the Completed page, verify the information, and then click
Finish.
NOTE: In the Hyper-V training environment, all number sequences are set up.
Therefore, you cannot run the wizard unless you first delete some number sequences.
Procedure: Set Up Number Sequences Manually
You can use the Number sequences page to create or modify selected number sequences. To manually create number sequences, follow these steps.
• On the Identification FastTab, enter an identification code and a name for the number sequence.
• On the Scope parameters FastTab, select a scope for the number sequence and select scope values. The scope defines which organizations use the number sequence. Additionally, number sequences that have a scope other than Shared can have segments that correspond to their scope. For example, a number sequence with a scope of Legal entity can have a legal entity segment. By default, the following scopes are available:
a. Shared: A single number sequence is used for all organizations. b. Company: A separate number sequence is used for each
company.
TIP: Use the Company scope when the underlying table includes the DataAreaId
field. For example, use this scope for the number sequence for the customer account number in the customer table, CustTable.
c. Legal entity: A separate number sequence is used for each legal entity.
TIP: Use the Legal entity scope when the underlying table does not include the
DataAreaId field and has a foreign key to the legal entity table, CompanyInfo. For example, use this scope for the number sequence for the expense report number that is in the expense report table, TrvExpTable.
d. Operating unit - A separate number sequence is used for each operating unit.
e. Company and Fiscal calendar period - A separate number sequence is used for each company and fiscal calendar period combination.
f. Legal entity and Fiscal calendar period - A separate number sequence is used for each legal entity and fiscal calendar period combination.
• On the Segments FastTab, define the format for the number sequence by adding, removing, and rearranging segments. Number sequences of all scopes can contain Constant segments and
Alphanumeric segments contain a combination of number signs (#) and ampersands (&). These characters represent letters and numbers that increment every time that a number from the sequence is used. Use a number sign (#) to indicate incrementing numbers and an ampersand (&) to indicate incrementing letters. For example, the format #####_2014 creates the sequence 00001_2014, 00002_2014, and so on. At least one alphanumeric segment must be present. Scope segments, such as company or legal entity, are optional. However, even if you do not include scope segments in the format, numbers for the selected reference are still generated for each scope.
• On the References FastTab, select the document type or record to assign this number sequence to. This step is optional for sequences that are defined for special application usage patterns. In these scenarios, a new number is generated by using the value of a number sequence code or ID, without using a reference. An example of a special application usage pattern is a voucher series that is used for specific journal names. However, the recommendation is not to use such patterns.
• On the General FastTab, specify whether the number sequence is manual, and continuous or non-continuous. Additionally, enter the lowest and highest numbers that can be used in the number sequence. • Save the number sequence and close the form.
Administration
The administration of number sequences is performed by using actions provided in the Administration group on the Action Pane on the Number sequences list page.
• Status list: Provides a list of numbers that are generated for continuous number sequences, but which are not committed to the database. The numbers are either currently being used in a user session, are reserved for future use in a user session, or are free for use if a new client user session requests a new number for a particular number sequence in the list. If a new number does not exist for a specific continuous number sequence, it is generated by the sequence number framework from the next value for that number sequence in the Number sequence table (NumberSequenceTable). • Manual cleanup: Allows the administrator to manually clean up
numbers in the status list. Use of this option is only recommended after an unexpected system failure; in such rare circumstances, numbers might not be automatically cleaned up.
• History: Provides the history of the changes to the number sequences.
Several administrator tasks can be performed from the Details page. An
administrator can, for example, schedule an automated periodic cleanup for every number sequence by entering intervals on the Automatic cleanup FastTab. An administrator can also assign number sequences by using a page in the parameter forms in individual application modules. For example, you can view or assign the number sequences to specific references in the General ledger module. You can open the form by using the path General ledger > Setup > General
ledger parameters.
Extensibility Scenarios
This section is primarily intended for developers who want to call an API that extends the NumSeqApplicationModule class to handle changes that are required by the enhanced number sequence framework. This API is called to create new fields on documents or master data entities that will use a number sequence. In a common extensibility scenario, a developer creates new fields and makes use of the new number sequence framework to generate values for those fields. There are two main extensibility scenarios:
• Company scenario: Based on the default segment of DataArea (or company).
• Organization model and regulatory scenario: Based on the use of new segments such as legal entity, operating unit, and fiscal calendar period.
The Microsoft Dynamics AX 2012 number sequence framework does not currently support an extensibility scenario to add arbitrary segments such as a warehouse or a site as a segment in the definition of a number sequence for a reference. That kind of extensibility would require significant customization to the number sequence framework.
In all extensibility scenarios, the assumption is that the developer is trying to set up a new module, has already defined a field in a table, and is using the new number sequence framework to generate values for that field.
A developer would typically follow these steps:
• Make changes to support the new extended data type that corresponds to the new field in the table.
Scenario: Create a Number Sequence with a Company
Scope
Isaac, the Business Application Developer, is developing a new module in Microsoft Dynamics AX for Fleet management. The module will require two new number sequences: one for the vehicle numbers, and one for the trip numbers.
He has already created a new extended data type, and the tables that will store the vehicles and trip information. Now he must modify the NumberSeqModule base enumeration, and create a new class that extends the
NumberSeqApplicationModule class that will store the information about the two number sequences.
When it is finished, he must modify the Fleet management parameters form to have a Number Sequences tab, and add the references so that the administrator can set up the number sequences.
Procedure: Modify the NumberSeqModule Base
Enumeration
To add Fleet management as a module in the number sequences base enumeration, follow these steps.
• Open the Development Workspace.
• In the Application Object Tree (AOT) window, expand Data
Dictionary > Base Enums.
• Select the NumSeqModule base enumeration. • Right-click the element and select New Element.
• Right-click the new element (this is named Element 1 by default) and select Properties.
• In the Name field, enter a name such as FleetManagement. • In the Label field, create or select a label such as "Fleet
management".
• Optionally, you can add a configuration key if it might be required to disable the Fleet management functionality in certain installation. • Click the Save all icon to save the changes.
TIP: Make sure that you add the base enumeration and any other objects that
you create or modify to a project. This makes the promotion of changes to a testing or production environment easier.
Procedure: Extend the NumberSeqApplicationModule
Class
To create a new class for Fleet management, that extends the
NumberSeqApplicationModule class and stores the two number sequences for the Fleet management module, follow these steps.
• Open the Development Workspace. • In the AOT window, expand Classes.
• Right-click the Classes node and then select New Class. • Right-click the newly created class and select Properties. • Enter a name for the class following the naming standard
NumberSeqModuleXXX where XXX represents the name of the
module such as, NumberSeqModuleFleetManagement. • Make sure that the new class extends the
NumberSeqApplicationModule, and then use the following code sample for the class.
Class declaration
public class NumberSeqModuleFleetManagement extends NumberSeqApplicationModule
{ }
protected void loadModule() {
NumberSeqDatatype datatype = NumberSeqDatatype::construct(); /* Vehicle Number */
datatype.parmDatatypeId(extendedtypenum(FMVehicleId)); datatype.parmReferenceHelp("Unique key for Fleet
Management vehicles"); datatype.parmWizardIsContinuous(false); datatype.parmWizardIsManual(NoYes::No); datatype.parmWizardIsChangeDownAllowed(NoYes::No); datatype.parmWizardIsChangeUpAllowed(NoYes::No); datatype.parmWizardHighest(999999);
//Use the DataArea segment
datatype.parmWizardIsManual(NoYes::No);
datatype.parmWizardIsChangeDownAllowed(NoYes::No); datatype.parmWizardIsChangeUpAllowed(NoYes::No); datatype.parmWizardHighest(999999);
//Use the DataArea segment
datatype.addParameterType(NumberSeqParameterType::DataArea, true, false);
this.create(datatype); }
public NumberSeqModule numberSeqModule() {
return NumberSeqModule::FleetManagement; }
• Right-click the Data Dictionary node in the AOT, and then select
Synchronize.
TIP: Notice that the DataArea segment describes the default segment for the
extended data types that are used for both vehicle number and trip number.
IMPORTANT: You will have to synchronize the database after you create a new
class that extends the NumberSeqApplicationModule class. This may take several minutes to complete.
Procedure: Create a Number Sequences Page in the
Parameters Form of the New Module
Next, you must create or modify a Number sequences page on the FMSetup form for the new Fleet management module. This requires you to override the numberSeqPreInit method.
You can refer to existing forms such as CustParameters or LedgerParameters for examples of the implementation. The following is sample code for the
numberSeqPreInit method on the form for Fleet management.
void numberSeqPreInit() { numberSequenceModules = [NumberSeqModule::FleetManagement]; numberSeqApplicationModule = new NumberSeqModuleFleetManagement(); scope = NumberSeqScopeFactory::createDataAreaScope();
(NumberSequenceReference::configurationKeyTableMulti(number SequenceModules));
}
NOTE: This form can only be used for references that have a scope of DataArea.
The administration forms described in the “Set Up and Administration” topic can be used for references that have any scope. These forms can be found in
Organization Administration > Common > Number Sequences.
TIP: You must add several variable declarations to the class declaration of the
form that you are modifying for the code sample provided to compile. Use the following code sample to guide you.
NumberSeqReference numberSeqReference; NumberSeqScope scope;
NumberSeqApplicationModule numberSeqApplicationModule; container numberSequenceModules; TmpIdRef tmpIdRef;
Procedure: Add a Method on the Parameters Table for
Vehicle Numbers
Next you must use the Number Sequence API in business logic on the parameters form (FMSetup) so that the number sequence references will appear. Use the following code sample in the new method.
Public server static NumberSequenceReference numRefVehicleID()
{
// Optional step for DataArea scope, mandatory for other scopes
NumberSeqScopeFactory::CreateDataAreaScope(); return
NumberSeqReference::findReference(extendedtypenum (FMVehicleID));
You must repeat this process and create a second method for the trip identification number on the FMSetup form.
Procedure: Add a Table Method for Creating New Vehicle
Numbers
Next, you must add a method to the FMVehicle table for creating a new number. Use the following code as an example for creating a new vehicle ID.
Void setVehicleID() { NumberSeq num; NumberSequenceReference numberSequenceReference; numberSequenceReference = FleetManagementParameters::numRefVehicleID(); if (numberSequenceReference) { num = NumberSeq::newGetNum(numberSequenceReference); this.VehicleID = num.num(); } }
NOTE: You must repeat this process for each number sequence.
Scenario: Create a Number Sequence with the
Organizational Model
Isaac, the Business Application Developer, is developing a new module in Microsoft Dynamics AX for Fleet management. The module will require two new number sequences: one for the vehicle numbers, and one for the rental numbers.
He has created the classes for storing the number sequences and the code that is required for the vehicle numbers already. He wants to make the trip ID number sequence include the data area ID and the fiscal calendar period segments. Now he must update the code to allow for the additional segments on the rental ID number sequence.
Procedure: Modify the loadModule() Method
For each extended data type that needs to be generated by the number sequences API, additional lines of code must be added to the loadModule() method inside of the NumberSeqModuleFleetManagment class already created in the "Extend the NumberSeqApplicationModule Class" procedure. The code is used to add the second segment. Use the following code sample to guide you.
...
/* Rental Number */
datatype.parmDatatypeId(extendedtypenum(FMRentalID)); datatype.parmReferenceHelp("Unique key for trips"); datatype.parmWizardIsContinuous(false); datatype.parmWizardIsManual(NoYes::No); datatype.parmWizardIsChangeDownAllowed(NoYes::No); datatype.parmWizardIsChangeUpAllowed(NoYes::No); datatype.parmWizardHighest(999999); datatype.addParameterType(NumberSeqParameterType::DataArea, true, false);
//Additional line of code for second segment added here: datatype.addParameterType(NumberSeqParameterType::FiscalCal endarPeriod, true, false);
this.create(datatype);
NOTE: The code sample only includes a section of the loadModule() method.
If you want to additional segments, you must add another call to the addParameterType() method before the call to the create() method.
Procedure: Add a Method on the Parameters Table for
Rental IDs
You have to create an instance of the scope for the two segments of DataArea (or company), and fiscal calendar period, and call the API with these two segments passed as parameters to the number sequence framework. The sample code for the Rental ID is as follows:
Public server static NumberSequenceReference numRefRentalID(TransDate _date = systemdateget()) {
NumberSeqScope scope =
NOTE: A FleetManagementParameters table does not exist in the training
environment by default. You can create one, or alternatively use any of the tables in the FMSetup form.
Procedure: Add a Table Method for Creating Rental IDs
Next, you must add a method to the table to create a new number. Use the following code as an example to create a new trip ID.
Void RentalID() { NumberSeq num; NumberSequenceReference numberSequenceReference; numberSequenceReference = FleetManagementParameters::numRefRentalID(); If(numberSequenceReference) { num = NumberSeq::newGetNum(numberSequenceReference); this.RentalId = num.num(); } }
NOTE: A FleetManagementParameters table does not exist in the training
environment by default. You can create one, or alternatively use any of the tables in the FMSetup form.
Scenario: Change the Scope for an Existing Reference
In this scenario, a developer is changing the scope of an existing reference. Isaac, the Business Application Developer wants to change the vehicle number to be global (or shared). The existing reference, FMVehicleID, has the scope of the DataArea segment. But the developer wants to change this to the global scope. The changes that are required to achieve this resemble those that are described in the previous section.
First, Isaac must remove the call to the addParameterType() method in the NumSeqModuleFleetManagment.loadModule() method for the vehicle ID. Then, he must update the NumberSequenceReference method on the Fleet management parameters table to create a global scope.
Procedure: Modify the loadModule() Method
When you use the global scope for a number sequence, you do not have to include a call to the addParameterType() method. Use the following code sample when you create the global number sequence.
protected void loadModule() {
NumberSeqDatatype datatype = NumberSeqDatatype::construct(); /* Vehicle Number */
datatype.parmDatatypeId(extendedtypenum(FMVehicleID)); datatype.parmReferenceHelp("Unique key for Fleet
Management vehicles"); datatype.parmWizardIsContinuous(false); datatype.parmWizardIsManual(NoYes::No); datatype.parmWizardIsChangeDownAllowed(NoYes::No); datatype.parmWizardIsChangeUpAllowed(NoYes::No); datatype.parmWizardHighest(999999);
//No longer need the Data Area Scope
//datatype.addParameterType(NumberSeqParameterType::DataAre a, true, false);
this.create(datatype); ...
NOTE: In the code sample provided, the call to the addParameterType() method
is commented out. Also notice that the sample provided is only a part of the method.
Procedure: Modify the numRefVehicleID() Method
The numRefVehicleID method on the FleetManagementParameters table must be updated to create a number sequence reference with a global scope. Replace the previous code with the following sample.
Public server static NumberSequenceReference numRefVehicleNumber()
Using Number Sequences in Forms
To use the number sequence for a form in Microsoft Dynamics AX, or in the Enterprise Portal, you will typically add code to the data source for the form or dataset. You can also retrieve a number sequence value directly in code.
Scenario: Use Number Sequences in a Form
Isaac, the Business Application Developer, is developing a new module in Microsoft Dynamics AX for Fleet management. He has created the new number sequences and set up the number sequence on the parameters form. Now, he wants to have the system automatically retrieve the next vehicle number when a user inserts a new record into the Vehicle form.
Procedure: Implement the Number Sequence Form
Handler
To set up a form to correctly handle the creation and update of a number sequence in a form, you must insert and update the number sequence when the form is closed or the record is deleted. Use the following code samples when you implement the number sequence form handler. For this example, it is assumed that you have a table and form data source named FMVehicle which has a field named VehicleId.
Start by declaring the NumberSeqFormHandler in the class declaration of the form.
public class FormRun extends ObjectRun {
NumberSeqFormHandler numberSeqFormHandler; }
Next, create a new method called numberSeqFormHandler. This method should call the static method newForm() on the numberSeqFormHandler class. Make sure that you pass in the number sequence reference from your parameters table, the data source which stores the number, and the table and field that will hold the number that is generated. Use the following code sample to guide you.
NumberSeqFormHandler numberSeqFormHandler() { if (!numberSeqFormHandler) { numberSeqFormHandler = NumberSeqFormHandler::newForm(FleetManagementParameters::nu mRefVehicleNumber().NumberSequenceId, element, FMVehicle_DS, fieldNum(FMVehicle, VehicleID)); } return numberSeqFormHandler; }
Next you must override the create() method on the data source where the number will be populated. Use the following code sample to guide you.
void create(boolean append = false,
boolean extern = false) // If created externally { element.numberSeqFormHandler().formMethodDataSourceCreatePr e(); super(append); if (!extern) { element.numberSeqFormHandler().formMethodDataSourceCreate(t rue); } }
The formMethodDataSourceCreatePre() method is used to validate that there is a last number on the number sequence. The call to this method must be positioned before the call to super().
The formMethodDataSourceCreate() method is used to create a record with a number sequence value. The call to this method must be positioned after the call to super().
The next step is to override the validateWrite() and write() methods on the data source where the number sequence is being inserted into. Use the following code samples to guide you.
public boolean validateWrite() {
boolean ret; ret = super();
ret =
element.numberSeqFormHandler().formMethodDataSourceValidate Write(ret) && ret;
return ret; } void write() { ttsbegin; super(); element.numberSeqFormHandler().formMethodDataSourceWrite(); ttscommit; }
Next, you must override the delete() method on the data source where the number sequence is being inserted. This is an important step that will make sure the number sequence is canceled and deleted when a record is deleted from your form that has a number sequence.
void delete() { ttsbegin; element.numberSeqFormHandler().formMethodDataSourceDelete() ; super(); ttscommit; }
The last step is to override the close() method on the form to make sure that the number sequence is canceled when the form is closed. Use the following code sample to guide you.
void close() { if (numberSeqFormHandler) { numberSeqFormHandler.formMethodClose(); } super(); }
Lab 1.1 - Implement a New Number Sequence
This lab demonstrates how to implement a new number sequence reference. Estimated time to complete: 20 minutes
Scenario
Isaac, the Business Application Developer, is developing a new feature in the Accounts receivable module for tracking customer contracts. The new customer contracts feature will be used to track the details and terms for multiple contracts on customers account.
Challenge Yourself!
Isaac must implement a new number sequence for the customer contract ID. He has already created a new extended data type(CustContractID), contract table (CustContract), and form (CustContract) to store all the contract information. Now you must create a new number sequence reference and add it into the
Accounts receivable parameters form. Make sure that you set up the number
sequence format and select it in the Accounts receivable parameters form. When you are finished, implement the Form Handler on the CustContract form and make sure that the system will populate the customer contract ID
automatically with the new number sequence when you are finished.
IMPORTANT: You must import the AX2012_ENUS_DEVIV_LAB.xpo file which
is located on the local drive of the training image before starting this lab.
Need a Little Help?
1. Import the NumberSequencesLab1_CustContract.xpo file which is located on the local drive of the training image.
2. Modify the loadModule() method on the
NumberSeqModuleCustomer class to include a new number sequence reference for the customer contract ID.
3. Create a new static method on the CustParameters table to find the number sequence reference.
4. Set up the new Customer contract ID number sequence reference in the Organization administration module, and then select it on the
8. Override the create() method on the CustContract data source inside the CustContract form.
9. Override the write() and validateWrite() methods on the CustContract data source in the CustContract form.
10. Override the delete() method on the CustContract data source in the CustContract form to make sure the number sequence is cancelled when the record is deleted.
11. Override the close() method of the CustContract form to make sure the number sequence is cancelled when the form is closed.
12. Open the CustContract form and insert a new record to verify that the Contract ID number is automatically populated.
TIP: The code samples for this lab can be found in the
AX2012_ENUS_DEVIV_01_01_LAB_CODE.txt file. You can copy and paste these code samples into the correct methods.
Step by Step: Import the Customer Contract Project
Follow these steps to import the Customer Contract project file. 1. Open the Development workspace.
2. Click Command > Import.
3. On the Import dialog box, click Browse.... 4. Browse to
E:\\80313_DevelopmentIV_XPOFiles.zip\80313_DevelopmentIV_X POFiles\AX2012_ENUS_DEVIV_01_01_LAB.xpo
5. Click Open. 6. Click OK.
7. Close the Compiler output window when the file is finished importing.
NOTE: You may need to extract the files in the
80313_DevelopmentIV_XPOFiles.zip folder first. You can do this by right-clicking on the folder and selecting Extract All....
Step by Step: Modify the loadModule() Method
To modify the code in the loadModule() method, follow these steps. 1. Open the Projects window.
2. Locate the NumberSequenceLab1_CustContract project that was created by the import, and then double-click it to open it.
6. Drag the class into the Project
NumberSequenceLab1_CustContract window.
7. Save the project.
8. Expand the NumberSeqModuleCustomer in the project and then right-click on the loadModule() method and select View code. 9. Add the following code to the end of the method:
/* Customer Contract ID*/
datatype.parmDatatypeId(extendedtypenum(CustContractID)); datatype.parmReferenceHelp("Unique key for Customer Contracts"); datatype.parmWizardIsContinuous(false); datatype.parmWizardIsManual(NoYes::No); datatype.parmWizardIsChangeDownAllowed(NoYes::No); datatype.parmWizardIsChangeUpAllowed(NoYes::No); datatype.parmWizardHighest(999999); datatype.addParameterType(NumberSeqParameterType::DataArea, true, false); this.create(datatype);
10. Click Save, and then close the Code Editor window.
11. Right-click the Data Dictionary node in the AOT window, and then click Synchronize.
NOTE: The Synchronize process can take several minutes to finish.
Step by Step: Modify the Parameters Table
To create a new method on the CustParameters table to find the number sequence reference for customer contract IDs, follow these steps.
1. In the AOT window, expand Tables.
2. Expand the Tables node and then expand the CustParameters table. 3. Drag the table into the NumberSequenceLab1_CustContract project. 4. Save the project.
Public server static NumberSequenceReference numRefContractID() { return NumberSeqReference::findReference(extendedtypenum (CustContractID)); }
7. Save the method, and then close the Code Editor window.
Step by Step: Configure the Customer Contract Number
Sequence
To configure the customer contract ID number sequence, follow these steps. 1. In the Microsoft Dynamics AX 2012 client, open Organization
administration > Common > Number sequences > Number sequences.
2. Click Number sequence in the New group of the Action Pane 3. On the Identification FastTab, enter Contract in the Number
Sequence and Customer Contract ID in the Name field.
4. Click the Scope parameters FastTab. 5. Select Company in the Scope field. 6. Select CEU in the Company field. 7. Click the Segments FastTab. 8. Click Add.
9. Select the Company segment in the grid, and then click Remove. 10. Select the Constant segment in the grid, and then change the Value
field to C. The Format field should now be C######. 11. Click the Reference FastTab.
12. Click Add.
13. Select Accounts receivable in the Area field. 14. Select Contract in the Reference field. 15. Click OK.
Step by Step: Add a Method to the Customer Contract
Table
To create a new method on the CustContract table to create a new number sequence, follow these steps.
1. Open the Development Workspace. 2. In the AOT window, expand Tables.
3. Expand the Tables node and then select the CustContract table. 4. Drag the CustContract table into the
NumberSequenceLab1_CustContract project. 5. Save the project.
6. Expand the CustContract in the project and then right-click the
Methods node and select New Method.
7. Add the following code to the method.
Void setCustContractID() { NumberSeq num; NumberSequenceReference numberSequenceReference; numberSequenceReference = CustParameters::numRefContractID(); if (numberSequenceReference) { num = NumberSeq::newGetNum(numberSequenceReference); this.custContractID = num.num(); } }
8. Save the method, and then close the Code editor window.
Step by Step: Implement the Number Sequence Form
Handler
To implement the number sequence form handler on the CustContract form, follow these steps.
public class FormRun extends ObjectRun {
SysFormSplitter_X verticalSplitter; NumberSeqFormHandler numberSeqFormHandler; }
5. Save the method and then close the Code Editor window.
To instantiate the number sequence form handler class in the customer contract form, follow these steps.
6. Right-click the Methods node of the CustContract form in the
AOT window, and then click New Method.
7. Add the following code into the new method.
NumberSeqFormHandler numberSeqFormHandler() { if (!numberSeqFormHandler) { numberSeqFormHandler = NumberSeqFormHandler::newForm(CustParameters::numRefContrac tID().NumberSequenceId, element, custContract_DS, fieldNum(CustContract, CustContractID)); } return numberSeqFormHandler; }
8. Save the method and then close the Code Editor window. To override the create() method, follow these steps.
9. Expand the Data Sources node of the CustContract form in the AOT.
10. Expand the CustContract data source and then right-click the
Methods node of the data source, and select Override Method.
11. Select Create from the list.
12. Add the following code into the create method.
void create(boolean append = false,
boolean extern = false) // If created externally
super(append); if (!extern) { element.numberSeqFormHandler().formMethodDataSourceCreate(t rue); } }
13. Save the method and then close the Code Editor window. To override the write() method, follow these steps.
1. Expand the Data Sources node of the CustContract form in the AOT.
2. Expand the CustContract data source and then right-click the
Methods node of the data source, and select Override Method.
3. Select Write from the list.
4. Add the following code into the write method.
void write() { ttsbegin; super(); element.numberSeqFormHandler().formMethodDataSourceWrite(); ttscommit; }
5. Save the method and then close the Code Editor window. To override the validateWrite() method, follow these steps.
1. Expand the Data Sources node of the CustContract form in the AOT.
2. Expand the CustContracts data source and then right-click the
Methods node of the data source, and select Override Method.
public boolean validateWrite() { boolean ret; ret = super(); ret = element.numberSeqFormHandler().formMethodDataSourceValidate Write(ret) && ret;
return ret; }
5. Save the method and then close the Code Editor window. To override the delete() method, follow these steps.
1. Expand the Data Sources node of the CustContract form in the AOT.
2. Expand the CustContract data source and then right-click the
Methods node of the data source, and select Override Method.
3. Select Delete from the list.
4. Add the following code into the delete method.
void delete() { ttsbegin; element.numberSeqFormHandler().formMethodDataSourceDelete() ; super(); ttscommit; }
To override the close() method, follow these steps.
1. Right-click the Methods node of the CustContract form in the AOT, and select Override Method.
2. Select Close from the list.
3. Add the following code into the close method.
void close() { if (numberSeqFormHandler) { numberSeqFormHandler.formMethodClose(); } super();
TIP: You can import the AX2012_ENUS_DEVIV_01_01_LAB_SOL.xpo file to
verify and compare your solution.
To test that the number sequence for the customer contracts is populating correctly, follow these steps.
1. From the Project window, right-click the CustContract form and select Open.
2. On the Customer contracts form, click New.
3. Verify that the Customer contract ID field has populated with a new number following the format C#####.
Summary
This chapter provided an overview of how number sequences are set up in the application. The chapter showed how the number sequence API works and how to implement a number sequence API in a code. Additionally, the chapter provided the steps that are required to implement a number sequence in a form. The primary purpose of the number sequence framework is to provide unique, user-friendly identifiers while maintaining a continuous or non-continuous alphanumeric sequence.
An administrator can assign number sequences by using a page in the parameter forms within individual application modules, or by using a wizard in the
Organization administration module.
The number sequence framework provides APIs that developers can implement to create new number sequences with global scopes, company scopes, or other organizational scopes. In addition the APIs can be used to implement number sequence in a form so that when records are created the number record is updated automatically with the next number available in the sequence.
Test Your Knowledge
Test your knowledge with the following questions.
1. TRUE or FALSE? Scope segments cannot be modified for a number sequence that is currently being used.
( ) TRUE ( ) FALSE
2. Describe the difference between a constant segment and an alphanumeric segment on a number sequence format.
3. Which of the following are supported scopes for number sequences in Microsoft Dynamics AX 2012? (Select all that apply)
( ) DataArea ( ) Department ( ) Legal Entity ( ) Fiscal calendar
Quick Interaction: Lessons Learned
Take a moment and write down three key points you have learned from this chapter
1.
2.
Solutions
Test Your Knowledge
1. TRUE or FALSE? Scope segments cannot be modified for a number sequence that is currently being used.
(•) TRUE ( ) FALSE
2. Describe the difference between a constant segment and an alphanumeric segment on a number sequence format.
MODEL ANSWER:
Constant segments contain a set of alphanumeric characters that do not change.
Alphanumeric segments contain a combination of number signs (#) and ampersands (&). These characters represent letters and numbers that
increment every time that a number from the sequence is used. Use a number sign (#) to indicate incrementing numbers and an ampersand (&) to indicate incrementing letters.
3. Which of the following are supported scopes for number sequences in Microsoft Dynamics AX 2012? (Select all that apply)
(√) DataArea ( ) Department (√) Legal Entity (√) Fiscal calendar
CHAPTER 2: FRAMEWORK FEATURES
Objectives
The objectives are:
• Describe the concept of events and how they can be used in Microsoft Dynamics® AX.
• Describe the various methods for integrating with Microsoft Dynamics AX.
• Describe the various types of services available in Microsoft Dynamics AX.
• Use a proxy class for .NET interop to X++. • Access managed assemblies from X++.
• Explain how .NET Framework assemblies are deployed.
Introduction
There are many frameworks available in Microsoft Dynamics AX 2012. This chapter provides descriptions of some frameworks, subsystems and features in Microsoft Dynamics AX 2012. Frameworks are collections of design patterns, interfaces, and code that provide support to you as a developer.
Eventing
Eventing is a design pattern for customization that is designed to enable non-intrusive, maintainable customizations. This technology enables you to customize the system without extensively altering source code in the base application. Eventing enables customization behaviors to be implemented in event handlers. The event handler code is called in response to an event that is raised in the course of the business logic execution on the system.
For more information about Eventing, refer to the "Event Handlers for Customization" topic in this chapter.
Address System
Addresses are handled by the Address subsystem. The global address book, or address subsystem, can help you understand the relationships among people and organizations that are associated with your organization. For example, a customer can also be a vendor in a marketing campaign, or a worker in your organization
NOTE: For more information about the address system refer to the "Global
Address Book" topic in the Application Foundation Features chapter in this course.
Batch Journal Framework
The Batch Journal framework can be used to run a group of tasks that is created by using the RunBase framework.
TIP: There are individual tts transaction controls for each task.
The RunBase framework provides a standardized approach to creating processes and batch jobs in Microsoft Dynamics AX. The framework must be used for every job-style function in the application.
The framework is implemented by the RunBase application class and supplies many features that includes the following.
• Query
• Dialog, with persistence of the last values entered by the user • Validate
• Batch execution for users to schedule jobs. This functionality uses the RunBaseBatch class and the pack() and unpack() methods with versioning.
• Progress bar • Run
• Client/server-optimized
NOTE: For more information about the RunBaseframweowrk, refer to the
RunBase Framework (http://go.microsoft.com/fwlink/?LinkId=238164) page on MSDN.
Business Operation Framework
The Business Operation Framework (BOF) follows the Windows
Communication Foundation (WCF) protocols and standards. With the BOF you can do the following.
For more information about the BOF, refer to the "Business Operation Framework" topic in this chapter.
Consistency Check Framework
The Consistency Check Framework helps validate the consistency of the data in the production database and helps fix the inconsistencies that it finds.
The framework consists of classes that have names ending in
"ConsistencyCheck" (for example, InventConsistencyCheck). Each of the framework classes extends the SysConsistencyCheck class.
Dimension
You can use the Dimension subsystem to work with financial dimensions. Use the InventDim subsystem to work with inventory dimensions.
For more information about the financial dimensions subsystem, refer to the
"Dimensions" topic in the Application Foundation Features chapter.
Document Management System
The document management system is automatically available everywhere in Microsoft Dynamics AX. Text notes and documents of any type and size can be attached to any record in Microsoft Dynamics AX.
Note fields should not be put on your own tables, instead use the document management system's text notes.
NOTE: If documents attached to a record are stored on a file share instead of in
the database in Microsoft Dynamics AX, you must make sure that the correct access levels are set.
Infolog
Information and messages to the user are located in the Infolog. It also contains contextual information and supporting Help and actions. For more information see the "Using the Infolog (http://go.microsoft.com/fwlink/?LinkId=238165)" page on MSDN.
Number Sequence
Microsoft Dynamics AX has a number sequence framework to generate
alphanumeric number sequences that are used to identify transaction documents such as sales orders.
Operation Progress
You can inform the user that a process will take some time by using the Operation Progress framework.
BEST PRACTICE: Use a progress indicator during operations that take more
than two seconds.
Use an hourglass mouse pointer if the process takes two to seven seconds. Use a progress bar if the process takes eight seconds or more.
NOTE: For more information, see the "How to: Create Progress Indicators
(http://go.microsoft.com/fwlink/?LinkId=238166)" page on MSDN.
Reporting
SQL Server Reporting Services (SSRS) is the primary reporting platform for Microsoft Dynamics AX. The default, out of the box reports provided with Microsoft Dynamics AX run on the Reporting Services platform. The new report development environment takes advantage of extended SQL Server tools and components. The report development environment is fully integrated into Microsoft Visual Studio®.
NOTE: For more information, refer to the Reporting chapter in this course.
Application Integration
The capability to integrate Microsoft Dynamics AX with other systems inside and outside the enterprise is a common requirement. Application Integration Framework (AIF) provides this capability by enabling the exchange of data through formatted XML. This formatted XML is referred to as a document, and each document contains data and business logic. Documents are based on a document class and defined by using Microsoft Dynamics AX.
Microsoft Dynamics AX is shipped together with many standard document services that support common business processes. By using the capabilities that AIF provides, you can also customize existing document services or create your own document services.