Professional Documents
Culture Documents
Dynamics AX Interview Questions PDF
Dynamics AX Interview Questions PDF
in/
101 Dynamics AX
Interview Questions
Mukesh Hirwani
Follow me @
BlogSpot: http://mukesh-ax.blogspot.in/
Microsoft Community:
http://community.dynamics.com/product/ax/axtechnical/b/mukeshhirwani_dynamicsax/default.aspx
Page | 1
Mukesh Hirwani BlogSpot: http://mukesh-ax.blogspot.in/
AX 2012 Technical
3. What are Partitions? What is the purpose of partitions in Microsoft Dynamics AX 2012 R2?
http://msdn.microsoft.com/en-us/library/jj677285.aspx
5. Table Keys: Surrogate, Alternate, Replacement, Primary, and Foreign [AX 2012]
http://msdn.microsoft.com/en-us/library/hh812105.aspx
6. Table properties
Property Description
The default value is No. If the value is Yes, the table cannot be a direct target
of X++ SQL statements such as update_recordset and select.
CountryRegionCodes Specifies the country region codes where the table is applicable or valid. The
client framework and application may make use of this property to enable
or disable country or region specific features. This is implemented as a
comma-separated list of ISO country codes in a single string. The values must
match data contained in the global address book.
Page | 2
Mukesh Hirwani BlogSpot: http://mukesh-ax.blogspot.in/
CountryRegionContextField Specifies the field that will be used to identify the country context. This
relates to the CountryRegionCodes property.
Extends Derives the table from another table that is chosen as the property value.
The value is null when the SupportInheritance property is set to Yes. For more
information, see http://msdn.microsoft.com/en-in/library/gg881053.aspx.
ListPageRef Specifies a display menu item that points to a form that can show a list of this
record type.
Model Specifies which model the table is in. A model is a logical grouping of elements
in a layer. An element can exist in exactly one model in a layer. Examples of
elements are a table or class. The same element can exist in a customized
version in a model in a higher layer.
PreviewPartRef Specifies the Info Part or Form Part to be used in the enhanced preview.
An info part shows a collection of data fields from a specified query. An info part
uses metadata to describe how the data appears. A form part represents a
pointer to a form.
ReplacementKey Specifies the fields to display as the identifier for data in some form controls.
SupportInheritance Setting this property to Yes enables you to set a value for other inheritance
related properties such as Extends and Abstract.
When you set the value to Yes, any fields on the table are dropped and must be
created again.
TableType Replaces the Temporary property found in Microsoft Dynamics AX 2009. For
more information, see http://msdn.microsoft.com/en-
in/library/gg863308.aspx.
ValidTimeStateFieldType Specifies the type of date-time field for the system to use when it tracks data
within time spans.
Page | 3
Mukesh Hirwani BlogSpot: http://mukesh-ax.blogspot.in/
AX 2012 R2
Property Description
Shows whether the table has a system field named Partition. This is meant to be
a read-only system field.
SaveDataPerPartition
If the table has a Partition field, each record is assigned to one partition. Each
record is kept hidden from data access operations that are run under the context
of other partitions.
7. AOT Elements
Node Description
Contains the data types and tables that make up the database. Also contains objects to
control access to the data. It contains the following sub nodes:
Tables: Tables that contain the Microsoft Dynamics AX data.
Maps: Enables you to create associations between closely related (but non-identical) table
fields and methods.
Views: Enables you to join data from different tables, and then to select which fields you
want to display.
Extended Data Types: Data types that extend one of the primitive data types or another
extended data type.
Base Enums: Enumerable types that contain a list of literals.
License Codes: Determines which components of Microsoft Dynamics AX functionality are
Data Dictionary available to a company.
Configuration Keys: Allows administrators to enable or disable features in the application
for all users.
Security Keys: Security keys are obsolete in Microsoft Dynamics AX 2012 and only exist to
use for reference during a code upgrade. There is a new security framework, which is called
role-based security. For more information on the new security framework, see What's New:
Security for Developers in Microsoft Dynamics AX 2012 and Role-based Security in the AOT
for Developers.
Table Collections: Collections of tables that contain data that is often shared between
companies.
Perspectives: Collections of tables that were used to organize information for report
models.
Contains the source code for the macros used by the standard application. In addition to
Macros
viewing the existing code, you can add your own macros.
Contains the source code for the application (X++) classes.
Classes You can also use system classes (also known as kernel classes). They are listed in the System
Documentation\Classes node.
Forms Dialog boxes in the user interface that are used to access the database.
Contains controls you can use to retrieve and show a collection of data. For more
Parts
information, see Parts.
Page | 4
Mukesh Hirwani BlogSpot: http://mukesh-ax.blogspot.in/
Provides a generic data access layer that allows for external presentation layers to bind to
Data Sets Microsoft Dynamics AX tables and data types. For more information, see Data Sets for
Enterprise Portal.
Contains SQL Server Reporting Services reports that are included with Microsoft Dynamics
SSRS Reports
AX.
Reports Enables users to print or display summary information from the database.
Contains projects created in Visual Studio and added to Microsoft Dynamics AX by using
Application Explorer. Project types that can be added to this node include Dynamics AX
Visual Studio Projects Model Projects, C Sharp Projects, Visual Basic Projects, Web Application Projects, and
Analysis Services Projects. For more information, see Visual Studio Integration and How to:
Add a Visual Studio Project to the AOT.
Used to store Microsoft Dynamics AX 2009 SQL Server Reporting Services report libraries
Report Libraries
that are being upgraded for the Microsoft Dynamics AX 2012 AOT environment.
Queries Used as the source of records for forms and reports.
Jobs Typically holds small X++ programs that are used to test new code.
Menus Contains the menus you want the end user to see.
Contains a complete list of the items that can be presented in a menu. Menu items act as a
Menu Items
higher layer of abstraction for forms, reports, and so on.
Web Contains objects related to Web development.
Services Contains services that are exposed by Microsoft Dynamics AX.
Contains collections of services that are frequently consumed and managed together. All
Service Groups
the services in a service group are published in a single WSDL file.
Contains the workflow model elements used to create a workflow configuration. This node
Workflow contains Categories, Tasks, Approvals, and Templates. For more information, see
Implementing Workflow for Microsoft Dynamics AX.
Contains the objects you use to implement application security, such as roles and
Security
permissions.
Resources Contains references to image and animation files.
Contains label files that store labels for all user interface elements. For more information,
Label Files
see Label Editor.
Contains references to Microsoft .NET assemblies and to external Web services. Both types
References
of references can be used in X++ statements.
Help Documentation
Specifies the documentation sets on the Help Server.
Sets
System Documentation Contains items that represent system (kernel) classes, functions, tables, and so on.
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.
Value Added Resellers (VAR) can make modifications or new developments to the VAR layer
VAR
as specified by the customers or as a strategy of creating an industry specific solution.
When an Independent Software Vendor (ISV) creates their own solution, their modifications
ISV
are saved in the ISV layer.
Page | 5
Mukesh Hirwani BlogSpot: http://mukesh-ax.blogspot.in/
SLN The solution layer is used by distributors to implement vertical partner solutions.
The FPK layer is an application object patch layer reserved by Microsoft for future patching
FPK
or other updates. For more information, see Patch Layers.
When the application is modified to match country or region specific legal demands, these
GLS
modifications are saved in the GLS layer.
The standard application is implemented at the lowest level, the SYS layer. The application
SYS
objects in the standard application can never be deleted.
Common AX Questions
9. OOPs concepts
Class : Class is the 1st OOPs concept .Class defines the characteristics of objects which includes its
attributes , fields properties and behavior . Let us say we have a class called car , then the color ,
model number , top speed can be its attributes and properties . Accelerating , breaking , turning
will be its behavior .
Objects: Objects can be considered as a thing that performs a set of related functions
.Programming objects are used to model real worlds objects. An object is also an instant of a class
. For our class Car , Ferrari will be our object
Instance : One can have an instance of a class; the instance is the actual object created at runtime.
The set of values of the attributes of a particular object is called its state. The object consists of
state and the behaviour that’s defined in the object’s class.
Method :Also called as functions in some programming languages , methods defines the
behavior of particular objects . For our Car class , turning() , breaking () will be our methods .
Inheritance : a parent class can inherit its behavior and state to children classes. This concept was
developed to manage generalization and specialization in OOP .Lets say we have a class called Car
and Racing Car . Then the attributes like engine no. , color of the Class car can be inherited by the
class Racing Car . The class Car will be Parent class , and the class Racing Car will be the derived
class or child class
Abstraction : representing only the important details without including all the details . For
example the car Ferrari can be treated as simple car only .
Encapsulation:The wrapping up of data and functions into a single unit is called as encapsulation
. For example the class car has a method turn () .The code for the turn() defines how the turn will
occur . So we don’t need to define how Mercedes will turn and how the Ferrari will turn separately
. turn() can be encapsulated with both.
Page | 6
Mukesh Hirwani BlogSpot: http://mukesh-ax.blogspot.in/
Polymorphism: Its an important OOPs concept , Polymorphism means taking more than one
forms .Polymorphism allows the programmer to treat derived class members just like their parent
class’s members. More precisely, Polymorphism in object-oriented programming is the ability of
objects belonging to different data types to respond to calls of methods of the same name .If a
Dog is commanded to speak(), this may elicit a bark(). However, if a Pig is commanded to speak(),
this may elicit an oink(). Each subclass overrides the speak() method inherited from the parent
class Animal.
10. Differences:
a. MorphX & Intellimorph
MorphX is the Microsoft Dynamics AX IDE( Integrated Development Environment) which
includes:
- Data Dictionary
- Tools for creating menus, forms and reports for Windows- and Web clients
- Compiler and debugger for the object oriented programming language X++
- Version control system
- Label (multi language text) systems
RunBaseBatch class: All jobs that must be able to run in a batch must inherit from this
class. The RunBaseBatch framework extends the RunBase framework, and X++ classes
that extend this framework can have their operations enlisted in the batch queue.
Page | 7
Mukesh Hirwani BlogSpot: http://mukesh-ax.blogspot.in/
RunBaseReport class: The RunBaseReport class makes all reports batchable and creates
a standard dialog box.
This class is instantiated through the SysReportRun Class. It should be used by all
reports. The purpose of the class is to:
- Make all reports batchable
- Create a standard dialog
If you are creating more complex reports, it might be necessary to inherit from this
class. If this is the case, you must create the following methods:
In forms the collection of objects is contained within a FormRun object. You can reference
members in the outer FormRun object by using the "element" reference.
If your code is placed at the top level there are no functional difference between "this"
and "element".
If your code is placed in a FormDataSource "this" will reference the datasource but
"element" will reference the "FormRun".
Page | 8
Mukesh Hirwani BlogSpot: http://mukesh-ax.blogspot.in/
Method construct() is a best practice to use when creating an instance. In this method
you code how to construct a specific class.
MenClothesOrder has the following fields: OrderId, ClotheId, Qty OrderId could be a
number sequence and Qty entered manually bby the user.
0 - Men
1 - Women
2 - Children
1. Normal = ClotheId to ClotheId (Best practice to specify this on the EDT) and
2. Related Fixed Field 0 = ClothesTable.CollecTionTypeId.
Page | 9
Mukesh Hirwani BlogSpot: http://mukesh-ax.blogspot.in/
This shows that the lookup to the clothes table should show only clothes with the same
ClotheId (point 1) AND clothes that are of type Men (point 2) because the our table deals
with order for mens' clothes. We use 0 because Menis element 0 in the Enum.
Imagine you have a ClothesOrders table (generic) and you have seperate tables for
MenClothesTable, WomenClothesTable and ChildrenClothesTable. Fixed field says that
the specified normal relation (on ClotheId) to MenClothesTable only works if the
CollectionTypeId of the current record is set to 0 (Men) else the relation is disabled.
View :
1. Views are created from one or more than one table by joins, with selected columns.
2. Views are created to hide some columns from the user
3. Views reduces the effort for writing queries to access specific columns every time.
4. View doesn't contain any data.
Generated designs are static, and will not automatically adjust to changes made in the
query or report template. It is recommended using auto designs. You should only consider
using generated designs in special cases where a fixed layout is needed. Generated
designs are generally only required where the layout is fixed by contract or statute, or
when you need to use pre-printed forms such as checks and purchase orders. Generated
designs have some extra sections for adding headers and footers to body sections. Beside
that auto designs and generated designs use the same type of sections.
Page | 10
Mukesh Hirwani BlogSpot: http://mukesh-ax.blogspot.in/
This method basically refreshes the data displayed in the form controls with whatever is
stored in the form cache for that particular datasource record. Calling refresh() method
will NOT reread the record from the database. So if changes happened to the record in
another process, these will not be shown after executing refresh().
2.refreshEx
This method should be used sparingly, in cases where multiple rows from the grid are
updated, resulting in changes in their display Options, as an example. So you should avoid
using it as a replacement for refresh(), since they actually have completely different
implementations in the kernel.
3. Reread
Calling reread() will query the database and re-read the current record contents into the
datasource form cache. This will not display the changes on the form until a redraw of the
grid contents happens
4. Research
Calling research() will rerun the existing form query against the database, therefore
updating the list with new/removed records as well as updating all existing rows. This will
honor any existing filters and sorting on the form, that were set by the user.
5. ExecuteQuery
Calling executeQuery() will also rerun the query and update/add/delete the rows in the
grid. The difference in behavior from research is described below.
ExecuteQuery should be used if you have modified the query in your code and need to
refresh the form to display the data based on the updated query.
An important thing to mention here is that the form has 2 instances of the query object -
one is the original datasource query (stored in formDataSource.query()), and the other is
the currently used query with any user filters applied (stored in
formDataSource.queryRun().query()).
When the research method is called, a new instance of the queryRun is created, using the
formDataSource.queryRun().query() as the basis. Therefore, if the user has set up some
filters on the displayed data, those will be preserved.
This is useful, for example, when multiple users work with a certain form, each user has
his own filters set up for displaying only relevant data, and rows get inserted into the
underlying table externally (for example, through AIF).
Calling executeQuery, on the other hand, will use the original query as the basis, therefore
removing any user filters.
Page | 11
Mukesh Hirwani BlogSpot: http://mukesh-ax.blogspot.in/
The available table group values are listed in the following table.
Table group Use this group for a table with these characteristics Examples
The table contains data primarily used as parameters or setup information
for one of the main tables (a table that has a TableGroup property of Main). CustParameters,
Parameter
VendParameters
The table typically contains only one record per company.
The table contains data primarily used to categorize one of the main tables
(a table that has a TableGroup property of Main). CustGroup,
Group
There is a one-to-many relationship between a Group table and a Main VendGroup
table.
The table is one of the principal tables in the application and contains data CustTable,
Main
for a central business object. VendTable
Page | 12
Mukesh Hirwani BlogSpot: http://mukesh-ax.blogspot.in/
WorksheetLine In comparison to the data contained in a Transaction table, the data in SalesLine
WorkSheetLine tables is temporary and may be deleted without affecting
system stability.
The table does not fit in any of the other categories. This is the default
Miscellaneous TableExpImpDef
value for a new table.
NumberSeq =
NumberSeq::newGetNumFromCode(SalesParameters::numRefSalesId().numberSequence);
salesTable.SalesId = NumberSeq.num();
salesTable.initValue();
salesTable.CustAccount = _custAccount;
salesTable.initFromCustTable();
salesTable.insert();
}
salesLine.clear();
salesLine.SalesId = _salesId;
Page | 13
Mukesh Hirwani BlogSpot: http://mukesh-ax.blogspot.in/
salesLine.ItemId = _itemId;
salesLine.createLine(NoYes::Yes, // Validate
NoYes::Yes, // initFromSalesTable
NoYes::Yes, // initFromInventTable
NoYes::Yes, // calcInventQty
NoYes::Yes, // searchMarkup
NoYes::Yes); // searchPrice
}
ttsbegin;
numberSeq =
NumberSeq::newGetNumFromCode(purchParameters::numRefPurchaseOrderId().NumberSequ
ence,true);
if (!Purchtable.validateWrite())
Page | 14
Mukesh Hirwani BlogSpot: http://mukesh-ax.blogspot.in/
{
throw Exception::Error;
}
Purchtable.insert();
purchFormLetter = purchFormLetter::construct(DocumentStatus::Invoice);
purchFormLetter.update(purchtable, // Purchase record Buffer
"Inv_"+purchTable.PurchId, // Invoice Number
systemdateget()); // Transaction date
if (PurchTable::find(purchTable.PurchId).DocumentStatus == DocumentStatus::Invoice)
{
info(strfmt("Posted invoiced journal for purchase order %1",purchTable.PurchId));
}
}
16. What precautions you need for overriding fetch() method for a report?
MSDN link of how to override the fetch Method to Filter Data for Reports.
17. Difference between OCC (Optimistic concurrency control) and PCC (Pessimistic
concurrency control)?
MSDN Link explaining OCC and PCC
Page | 15
Mukesh Hirwani BlogSpot: http://mukesh-ax.blogspot.in/
Purchase Order
Sales Order
Tables Overview
Relations in Tables
Page | 16
Mukesh Hirwani BlogSpot: http://mukesh-ax.blogspot.in/
AOT Query
X++ Query
29. Explain different types of reports? There are two types of reports in AX
SSRS Reports
X++ Reports
30. Differentiate auto design spec & Generated design? Which one is a preferable choice and Why?
Report Design for X++ Reports
31. What are all the add- on tools you used in Dynamics AX (It’s an indirect question for AIF)
http://technet.microsoft.com/en-us/library/gg731810.aspx
34. Did you work with EP (Enterprise Portal & Workflow) how you can implement this features into
your projects?
EP in AX 2012
35. Can you just point out some best practice you used when u develop a project?
http://msdn.microsoft.com/en-us/library/aa658028.aspx
38. What are all the add- on tools you used in Dynamics AX (It’s an indirect question for AIF)
http://technet.microsoft.com/en-us/library/gg731810.aspx
Page | 17
Mukesh Hirwani BlogSpot: http://mukesh-ax.blogspot.in/
Page | 18
Mukesh Hirwani BlogSpot: http://mukesh-ax.blogspot.in/
58. What is an EDT, Base Enum, how can we use array elements of an EDT?
http://msdn.microsoft.com/en-us/library/aa675074.aspx
59. Definition and use of Maps, how AddressMap (with methods) is used in standard AX?
http://msdn.microsoft.com/en-us/library/bb278211.aspx
62. Multiple inheritance possible or not, if not how can we overcome that.
Multiple inheritance is not support. Use interfaces and/or composition instead
Page | 19
Mukesh Hirwani BlogSpot: http://mukesh-ax.blogspot.in/
68. What is a static method, why do we make static methods and where can we write it?
http://msdn.microsoft.com/en-us/library/aa584754.aspx
73. validateWrite() method can be written in form datasource as well as table level, when should we
write it in form DS and when in table. Similar in case of write() method?
User input validation must be performed in form datasource validate. Validation which involves
data to be fetched from different table or validation with a complex logic must be written to
table validate write.
74. How can we call table level methods from form DS (similar methods)
Use Table name.
75. Where is the best place to write code to perform filter in a form
http://msdn.microsoft.com/en-us/library/aa892864.aspx
76. What are the different types of menu items available, explain each of them
http://msdn.microsoft.com/en-us/library/aa596556.aspx
78. How can we sort the DS, what facility we can get in by placing fields in Ranges
http://mukesh-ax.blogspot.in/2011/04/query-ranges-in-x.html
Page | 20
Mukesh Hirwani BlogSpot: http://mukesh-ax.blogspot.in/
Page | 21
Mukesh Hirwani BlogSpot: http://mukesh-ax.blogspot.in/
Page | 22