33
Microsoft Dynamics Ax 2012 Development Introduction

Microsoft dynamics ax 2012 development introduction part 1/3

Embed Size (px)

DESCRIPTION

Introduction to Development in Dynamics ax 2012

Citation preview

Page 1: Microsoft dynamics ax 2012 development introduction part 1/3

Microsoft Dynamics Ax 2012 Development Introduction

Page 2: Microsoft dynamics ax 2012 development introduction part 1/3

ByAli Raza Zaidi

[email protected]

Page 3: Microsoft dynamics ax 2012 development introduction part 1/3

Contents

• Objective.• Features• Microsoft Dynamics AX 2012 Architecture• Data Dictionary • Non-graphical Objects • Forms • X++ Overview • X++ Control Statements• Classes and Objects• Accessing the database• Exception Handling• Conclusion

Page 4: Microsoft dynamics ax 2012 development introduction part 1/3

Objective

"To present profoundly overview of Microsoft Dynamics Ax Development Introduction.“

Page 5: Microsoft dynamics ax 2012 development introduction part 1/3

Why Microsoft Dynamics AX? Microsoft Dynamics AX core strengths are in 

manufacturing and distribution. More than 60% of Microsoft Dynamics AX users are from these industries.  

Microsoft Dynamics AX allows you to share and update information across the company in real time, across multiple sites and in multiple countries. Microsoft Dynamics AX is an all-inclusive, company-wide ERP system that customizes to your business.  

Microsoft Dynamics AX is completely intesgrated from your platform up through the end-user business solutions applications. 

Page 6: Microsoft dynamics ax 2012 development introduction part 1/3

Microsoft Dynamics AX works like and with familiar Microsoft software, automating and streamlining business processes and connecting you with global customers, business partners and subsidiaries in a way that helps you drive business success.  

Microsoft Dynamics AX has fully integrated financials, eliminating the need for duplicate data entry in other areas of the business. Microsoft Dynamics AX provides greater insight into your finances and improves your ability to make the right decisions quickly.  

Microsoft Dynamics AX is an object oriented ERP solution that has the lowest total cost of ownership in the market.  

Microsoft Dynamics AX fits perfectly in the manufacturing industry with its multi-item dimensions capability, multi-storage capability, multi-language support and its open-source integrated development environment. 

Page 7: Microsoft dynamics ax 2012 development introduction part 1/3

Features• High flexibility; • Microsoft Office look and feel; • Integrated development environment for

developing; • Visual Studio integration; • Uniform and compact viewing repository

(Application Object Tree); • Drag-and-drop functionality; • Projects help organize and track customized

applications.

Page 8: Microsoft dynamics ax 2012 development introduction part 1/3

ARCHITECTURE Microsoft Dynamics AX 2012

Topics • Three-Tier Architecture

• Client Workspace • Development Environment

• Layers • Models

Page 9: Microsoft dynamics ax 2012 development introduction part 1/3

Three-Tier Architecture• The client application

allows users to connect to the server to access business logic and use the data in the database.

• The server runs the application business logic.

• The database stores the data.

Page 10: Microsoft dynamics ax 2012 development introduction part 1/3

• The following image describes a typical system architecture that includes other components of the Microsoft technology stack:

Page 11: Microsoft dynamics ax 2012 development introduction part 1/3

Client Workspace

Page 12: Microsoft dynamics ax 2012 development introduction part 1/3
Page 13: Microsoft dynamics ax 2012 development introduction part 1/3

Development Environments• Morphx IDE

o X++ language code is written here.o Drag and Drop.o Code written forms, Classes and logic written here

• Visual Studio.o Any Manage Code will be written hereo Report Customization and Development.o Remote Debugging Tools.o Application Explorer (Read Only ).

Page 14: Microsoft dynamics ax 2012 development introduction part 1/3

Microsoft Dynamics AX 2012 Layered Architecture

The method used by Microsoft Dynamics AX 2012 to separate and control the updates and modifications made in the application is known as "layering.“

Layers are a hierarchy of levels in the application The standard application is never overwritten

Page 15: Microsoft dynamics ax 2012 development introduction part 1/3

Layer Description

USR The user layer is for user modifications, such as reports.

CUS The customer layer is for modifications that are specific to a company.

VAR Value Added Resellers (VAR) can make modifications or new developments to the VAR layer as specified by the customers or as a strategy of creating an industry specific solution.

ISV When an Independent Software Vendor (ISV) creates their own solution, their modifications are saved in the ISV layer.

SLN The solution layer is used by distributors to implement vertical partner solutions.

FPK The FPK layer is an application object patch layer reserved by Microsoft for future patching or other updates. For more information, see Patch Layers.

GLS When the application is modified to match country or region specific legal demands, these modifications are saved in the GLS layer.

SYS The standard application is implemented at the lowest level, the SYS layer. The application objects in the standard application can never be deleted

Page 16: Microsoft dynamics ax 2012 development introduction part 1/3

Models• A model is a logical grouping of elements within a

layer.• Models help in situations where multiple ISV

solutions or projects must operate together.• An element can exist in exactly one model in a

layer.• New models are easy to create in the MorphX IDE

and are applied when modifying or adding objects in the AOT.

Page 17: Microsoft dynamics ax 2012 development introduction part 1/3

DATA DICTIONARY

Topics • Application Object Tree

• Labels • Table Structure and Components

• Views• Maps

• Base Enums• Extended Data Types

• Table Collections:• Projects

Page 18: Microsoft dynamics ax 2012 development introduction part 1/3

Application Object Tree (AOT)

The Application Object Tree (AOT) is a tree view of all the application objects within

Microsoft Dynamics AX 2012. Viewing Repository The AOT contains everything needed to customize the look and functionality of a Microsoft Dynamics AX 2012 application.

Page 19: Microsoft dynamics ax 2012 development introduction part 1/3

Label Files

system which systematizes all the labels (for buttons, forms, dialog boxes, and more) for a specific language in one file; a label file

A label is the text that appears in the user interface.Create New Label File: Tools > Development Tools > Label

> Label File Wizard.

Page 20: Microsoft dynamics ax 2012 development introduction part 1/3

Table Structure and Components

Tables: Tables store data in the system. They are organized in fields. These are assigned to different data types,

depending on the type of data they hold. Data is entered, edited, and deleted through forms. Tables are discussed in more detail later in the section.

Creating a Table:

1. Create a table. 2. Create extended data types. 3. Add fields to the table.

Drag relevant extended data types to the Fields node of the relevant table.

4. Create relations on extended data types. 5. Create indexes.

Page 21: Microsoft dynamics ax 2012 development introduction part 1/3

Table Structure and Components

Indexes :An index is a table-specific database structure that speeds the

retrieval of rows from a table. Indexes are used to improve the performance of data retrieval and occasionally to ensure the existence of unique records. It's up to the database-specific query optimizer to use available indexes to facilitate efficient data retrieval.

The indexes in the Microsoft Dynamics AX 2012 table definition are the physical indexes that exist on the tables in the database.There are two types of indexes: • Unique • Non-Unique

Page 22: Microsoft dynamics ax 2012 development introduction part 1/3

Table Structure and Components Whether an index is unique is defined by the index's AllowDuplicates property. When this property is set to No, a unique index is created. The database uses the unique index to ensure that no duplicate key values occur. The database prevents you from inserting records with duplicate key values by rejecting the insertSetting the index's AllowDuplicates property to Yes creates a non-unique index. These indexes allow you to enter duplicate values for the indexed fields and are used for performance reasons.System IndexMicrosoft Dynamics AX requires a unique index on each table so if there are no indexes on a table or all the indexes are disabled, a system index is automatically created. The system index is created on the RecId and DataAreaId fields if the DataAreaId field exists. Otherwise the system index is created on the RecId field. You can see system indexes in the database but they aren't visible in the AOT.

Page 23: Microsoft dynamics ax 2012 development introduction part 1/3

Table Structure and Components Relations:

Relations are a method that helps secure business rules to enforce existing properties between field values existing in different tables. This is known as referential integrity.

Page 24: Microsoft dynamics ax 2012 development introduction part 1/3

DATA DICTIONARY(Contd.)

Data Types – Primitive and Extended Microsoft Dynamics AX 2012 has built in primitive and extended

data types associated with the information in the database.Primitive Data Types

Extended Data Types Extended Data types can inherit either from primitive types or other Extended Data Types, which enables properties to be inherited.

Page 25: Microsoft dynamics ax 2012 development introduction part 1/3

Delete Actions: Microsoft Dynamics AX 2012 uses a category of methods called Delete Actions to govern how data is handled when a deletion event occurs in a parent tableRelations.

Methods:Microsoft Dynamics AX 2012 uses methods within the table node to perform a variety of functions such as contact person and currency name lookup.

Page 26: Microsoft dynamics ax 2012 development introduction part 1/3

DATA DICTIONARY(Contd.) ViewA 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.

Page 27: Microsoft dynamics ax 2012 development introduction part 1/3

DATA DICTIONARY(Contd.)

Maps Map Use a map element type to specify a data entity type that factors out common tablefields and methods for accessing data stored in horizontally partitioned tables. For example, the CustTable and VendTable tables in the Microsoft Dynamics AX application model are mapped to the DirPartyMap map element so that you can use one DirPartyMap object to access common address fields and methods.

Extended Data Types

Page 28: Microsoft dynamics ax 2012 development introduction part 1/3

DATA DICTIONARY(Contd.)

Base Enums : Base enums are a list of literals. They can be used throughout the development environment in MorphX.

Table Collections: Table collections do not contain any data. Virtual companies are built on table collections. They contain

tables shared by more than one company. A table can be a part of more than one table collection.

Perspectives : Perspectives organize tables, folders, fields, and roles, in subsets according to application modules in an intuitive way. Perspective Use a perspective element type to specify a group of tables and views used together when designing and generating SSAS unified dimensional models.

Page 29: Microsoft dynamics ax 2012 development introduction part 1/3

Projects: Projects organize new or customized application objects.

Think of a Project as a reference folder for related objects. Advantage of Projects is the ability to save a project's

contents and state separately for each user by using Private Projects.

Page 30: Microsoft dynamics ax 2012 development introduction part 1/3

Non-graphical Objects Topics

• Classes • Macros :

• Jobs• Queries

Page 31: Microsoft dynamics ax 2012 development introduction part 1/3

Microsoft Dynamics AX Non-graphical Objects

Classes: Classes have the following characteristics:

Classes allow reuse common functionality or business logic. Classes are a design or blueprint for a programming object. Classes can be run directly from the AOT if a Main method is defined. Classes in Microsoft Dynamics AX 2012 share the same attributes a class in C# has, such as

inheritance, polymorphism, and encapsulation

Page 32: Microsoft dynamics ax 2012 development introduction part 1/3

Microsoft Dynamics AX Non-graphical Objects(Contd.)

Macros :

Macros act as a container for defining variables used for frequent tasks. The purpose of macros is to make statements easy to reuse. A macro cannot be executed independently of a class.

Page 33: Microsoft dynamics ax 2012 development introduction part 1/3

Microsoft Dynamics AX Non-graphical Objects(Contd.)

Jobs The jobs node on the application object tree contains small X ++ programs that are

executed as batch jobs. They are useful when developing and testing new functionality for Microsoft Dynamics

AX 2012. Queries

Queries ask questions about data stored in a database. The information selected by a query can be used as the basis for a form, auto report.