Académique Documents
Professionnel Documents
Culture Documents
A. This time Microsoft ERP is in high demand. Lot of small, medium and big industries implementing
this ERP. Microsoft provide many types of ERP like navision, CRM and Axapta. Axapta is one of the
best ERP of Microsoft.
Enterprise portal is web part of Axapta and license for EP per user is much more cheap but license
value for Axapta application user is much high.
If you are seeking license for EP then you can get it under Rs 10000 per user but for Axapta
application it goes around 2 lacs per user.
In comparison with SAP this ERP is not costly and easy to implement and not much effort required to
learn Axapta ERP.
It’s much user friendly and operating menu is so easy. New company setup is also easy in this ERP
whole setup you can do within day.
In India many companies are implementing this ERP and some companies like Godrej InfoTech,
DEVITPL, tectura etc are companies which involves in development.
Lot of companies like NDS involve in doing outsourcing also. If you are Axapta developer or function
then in US its high demand and moving to other country will be easy for you.
The way one can import data into Microsoft dynamics ax from a .dat file is
2. Then selecting the dat file to capture the data into AX.
3. Once the .dat file is loaded we can make a batch job to update the table or else we can do it
manually as well.
But if the data is huge it will take forever to load the data because it does all the validations for each
data while uploading it. But there is a fix.
Note: Before following these steps make sure you have your database backed up because these steps
overwrite the existing data
-> once you have the .dat file then open Microsoft SQL Server Management Studio
-> In the Object explorer window select the database for AX.
-> On the source for restore, select the radio button From device:
-> By clicking on the browse button to the right of the option, give the path of the .bat file.
-> Your database will get listed at the bottom of the screen
-> Select the Options menu on the Select a Page tab again(near General menu)
It will take few minutes to load the data directly into the database, once it is complete you can start
the AOS services again.
Click Tools > Code Upgrade > Compare layers. The Compare layers tool opens.
Option Description
Project name The name of the project to contain the results of the compare layers
tool process.
Source layer The layer used as the base layer for the comparison.
Reference layer The layer that you want to compare to the source layer.
Note :You can select old sys as the reference layer. This is useful if
you want to learn what application objects have changed.
Only include elements Select to detect conflicts between layers. When selected, elements
present in both layers found in only one of the layers are ignored.
A project holding application objects that differ is now created. The objects are presented in a tree
structure and the regular Application Object Tree (AOT) shortcut menu commands are available.
A. In Microsoft Dynamics AX, you can compare application objects to find differences by using the
Compare tool. After you identify the differences, you can insert, delete, or move the differences
between the compared application object. This topic describes how to interpret the results of the
comparison.
Two versions of the same application object, if you are using version control.
Two versions of the same application object and the original version of the application object.
A. In Microsoft Dynamics AX, you can compare two application objects in the same or different layers
by using the Compare tool. For example, you can compare a table in the CUS layer with the same
table in the SYS layer. The Compare tool identifies the differences between the two application
objects and provides action buttons to copy, move, or delete the differences. This topic describes how
to compare two application objects in the Application Object Tree (AOT).
In the AOT, select the application objects that you want to compare.
Right-click the selected application objects, and then click Compare. The Comparison form opens.
Click the Advanced tab, and then set the following options as needed.
Option Description
Show differences Select this option to view only the differences. When this option is cleared,
only matching results are displayed as black check marks.
Case sensitive Select this option to view upper and lowercase differences. By using this option,
MyName and Myname would be displayed as a difference.
Show line Select this option to enable line numbers in X++ code.
numbers
In Microsoft Dynamics AX, a layer system is used to manage elements. The USR layer is the top layer
and the SYS layer is the bottom layer, and each layer has a corresponding patch layer above it.
Layer Description
USR The user layer is for user modifications, such as reports. (50001 – 60000)
CUS The customer layer is for modifications that are specific to a company.
40001 – 50000
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. (30001 – 40000)
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. (1-
20000)
FPK The FPK layer is an application object patch layer reserved by Microsoft for future
patching or other updates.
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.
Each layer has a corresponding patch layer that can be used to incorporate updates to your application
or to store conflicts when you import models into a layer
Each layer in Microsoft Dynamics AX has a corresponding patch layer that can be used to incorporate
updates to your application or to store conflicts when you import models into a layer. The following
table shows the layers along with the corresponding patch layers:
USR USP
CUS CUP
VAR VAP
ISV ISP
SLN SLP
FPK FPP
GLS GLP
SYS SYP
Providing Updates :
The patch layers are designed to make it easy to incorporate updates in your application. The basic
idea is that when a minor update or correction is made, it is distributed in a patch file. Modified
objects in the patch file are automatically used because they take precedence over the regular
application objects.
X++:
1. What are the three main Object-Oriented Programming components?
A) Classes are blueprints that describe the objects derived from them. A class is a model classification
of the methods and variables within a specific type of object. Objects are instances of classes. Each
instance has data members and logic (methods) defined in the class. Methods are functions
(subroutines) associated with a class or an object. An object implements its behavior with methods.
A) The code window pane displays the X++ code that is currently being debugged.
The variables window displays the value of the variables in the current block of code. Modified
variables appear in different colors to indicate change. The call stack window tells you which method is
currently being worked on.
The Breakpoint window consists of a header with two columns and the list of currently defined
breakpoints.
The Output window in the Microsoft Dynamics AX Debugger has separate views that display text
written to the window from X++ code and kernel code. These views organize the information that is
sent to the Output window.
The code editor is used for editing and creating X++code. This editor contains many functions in the
toolbar, through shortcutkeys, and also using the context (right-click) menu. The code editor has two
panes: the left side shows a list of the current methods and the right side shows the current X++
code.
A. DateTimeUtil::getDifference(DateTimeUtil::getSystemDateTime,abcDatetime)
The following options in the Microsoft Dynamics AX Configuration Utility can used to enable
breakpoints for a Business Connector instance or a client:
Enable user breakpoints to debug code running in the Business Connector For sessions owned by
users for whom debug is enabled within Microsoft Dynamics AX, allow X++ code running in the
Business Connector to be interrupted by breakpoints
Enable global breakpoints to debug code running in the Business Connector or client For all users,
allow X++ code running in the Business Connector or client to be interrupted by global breakpoints
1. Open the Server Configuration utility (Start > Administrative Tools > Microsoft Dynamics AX Server
Configuration).
2. Verify that the currently selected AOS instance and configuration are the ones you want to modify.
3. On the Application Object Server tab, click Enable breakpoints to debug X++ code running on this
server, and then click OK
A. If we use group by clause in ax then we should know how it work . for example
it means you will get record by grouping of testno and testgroup but it there is no field selected that
means its internally two fields testno,testgroup is in select query means actual query working like this.
You can also select group by clause with while like this
statements;
-----------
----------
X++ runtime: It runs the X++ code which provides most of the business logic in Microsoft Dynamics
AX.
A. datatypes, operators and expressions, methods and variables, classes and objects, language
construct macros.
a. If Statement - this statement checks to see whether a condition is true/false. If the statement is
true, all the code in the braces ‘{}’ is executed. There are other versions of the If statement including
an If…Else, or a nested If statement.
b. Switch Statement - this is a multi-branch control statement that defines a condition and whose
result determines the code that is executed. A switch statement has multiple cases and for each case
there are listed statements that will be executed if that case satisfies the condition.
c. Ternary Operator – this control structure acts as an If…Else statement. Its primary reason for use is
because it is much more convenient to code than writing out an If…Else statement.
5. Which arithmetic operator would you use if you wanted to output the remainder when
dividing 83 by 10 and what would the syntax?
MOD 83 Mod 10
6. What is the main difference between using a while statement and a do...while statement?
The main difference between a While statement and a Do While statement is that the condition is
evaluated after the statements are executed in a Do While statement. Therefore a Do While statement
always runs at least one time.
7. What is the function ‘mthname’ used for? What is its syntax? Give an example using this
function?
‘Mthname’ is used to return the month name based on the number specifying the month. Its syntax is:
str mthname (int month);
Object methods can only be activated by an object that has been instantiated from the specific class.
An object method is called as follows: ref_name.testmethod();
Class methods can be attached directly to a class and do not need an instantiated object to work. Use
the ‘static’ modifier when you create class methods. A class method is called as follows:
Class_name::testmethod();
10. What is the reserved word in a function that is used when the method does NOT return
a value?
ANS: void
11. To execute a class's methods from a menu item, modify the method?
ANS - Main
12. What are the three rules when declaring variables when you write X++?
Use a ‘;’ (semicolon) to separate the declarations from the rest of the code.
If you want to change the query to show other records, perhaps based on a modified filter, then you
should use executeQuery."
13. What is wrong with the following code? Rewrite it so that it compiles correctly?
VendTable vendTable;
select count(vendTable.AccountNum);
print vendTable.AccountNum;
pause;
You are only supposed to specify a field name as a parameter to the keyword COUNT and then add a
from clause after this function. The following shows the code written correctly:
Vendtable vt;
Select COUNT(accountnum) from vt;
print ct.AccountNum;
pause;
b. The order by clause in a select statement that will return records in ascending order by default and
if specified, can return them in descending order.
c. The group by clause in a select statement will group records by a selected field.
15. What are the three keywords associated with the Transaction Tracking System and
what is their significance?
ttsCommit: You mark the successful end of a transaction with a ttscommit.This ensures that the
transaction has performed as it was supposed to upon completion
ttsAbort: This can be used as an exception to make a transaction be aborted and rolled back to its
state before the ttsbegin. You insert a ttsAbort wherever you want this to occur.
16. What is the main idea behind exception handling in X++ programming?
The main idea behind exception handling is to plan for potential pitfalls within the program. These
exceptions are inevitable and if the code can expect some of these issues and have contingency plans
for the code, the flow of the program is more efficient.
The try command signifies the start of a block of code that is included in the try...catch statement. It
is used as the point to which the logical program flow will return should it encounter a retry command.
A. The infolog is used for communicate with the application users. You use the infolog to inform the
user validation if an error occurs or to display the information to the user while processing job. There
are three types of in the infolog.1. info 2.warning 3.error.
Info: text is the generally displayed to the inform users about the action performed by the system.
Warning and errors typically represent issues that may require action from the user and may indicate
that a process unabled to proceed.
18. What is the function of a retry command and when is it most useful?
The retry command is used to make the try block of the try and catch statement execute one more
time. This command is used more for simple locks that may be released while in the catch statement.
This enables the try statement to execute without an exception the next time through. It is most
beneficial for overcoming database locks.
19. How is the throw statement related to the Transaction Tracking System (tts)?
The throw statement automatically initiates a ttsAbort command every time that it is called. The throw
command therefore will force the current transaction to roll back to the state it was at before the
ttsBegin command.
20. Which application element is used to define to which module a workflow is applicable?
21. Which type of AOT element needs to be created to specify which tables will be affected
by a workflow?
Ans: Query
22. There are three types of providers that define what rules the workflow can follow. What
are they?
23. Which two properties on a form data source need to be modified to allow the form to
use a workflow?
A core concept of MorphX is inheritance. Think of inheritance as a child object receiving properties
from a parent object. Characteristics of inheritance include the following:
* What is defined at a higher level in the system is automatically inherited by lower levels
* Microsoft Dynamics AX 2009 is flexible and modifiable on many levels because of this hierarchical
structure
* A single parameter can be modified for the whole system to inherit the change. For example, if the
length of a database field changes from ten to twenty characters, the change is automatically reflected
* The concept of inheritance is used in all object-oriented programming languages. Their definition
differs slightly. The object oriented programming concept of inheritance refers to one class Inheriting
methods from a base class.
A) "this" can be used in any objects to reference the current object and member 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”.
A. The edit method modifier is used to indicate that a method’s return value is to be displayed on a
form, and users can edit that value. If you don't want users to edit the value, use a display method.
According to me you create display method at Table leve so you can use that same method on form
by specifying dataSource of that control to "table" & have that method at method property. same way
you can use this method at report so it’s better to create this method at Table.
3. Can we specify the type of operation a user can perform on table depending upon
user’s permission in Dynamics Ax 4.0?
7. What is optimistic concurrency control? And how you can enable it for a table in Ax 4.0?
The optimistic concurrency control is enabled for a table by setting the OccEnabled property on a table
or calling the DictTable.occEnabled method.
When this mode is enabled, data is not locked from future modification when it is fetched from
the database. Data is locked only when the actual update is performed.
A. If you want to get name of current active company then curExt() is right method to get it just try
following code in job
info(CurExt());
A. 1. Create simple job job_test and add it to action menu item in AOT.
Args args;
args.name(identifierStr(Jobs_Test));
new menuFunction(menuItemActionStr(Jobs_Test), MenuItemType::Action).run(args);
9. What type of changes are there in Axapta3.0 and AX4.0 related to recid?
ANS: check box Start the AOS Windows service as part of installation should be unchecked.
pause;
17. What business connector enterprise portal uses to connect with SharePoint?
ANS: 2 Templates.
24. Business connector proxy must be a member of which user groups in AD?
25. Action type WebmenuItem is used to refer what type of object in AX?
26. Output type webContent is used to refer what type of objects in AX?
27. Display type webContent is used to refer what type of objects in AX?
29. What type of weblet we use to display the Axreport or Webreport in EP?
ANS: WebReportweblet.
ANS: WebFormWeblet.
ANS: Set the debug mode to “When break point” in Development tab in tools-> options.
Check “Enable breakpoints to debug X++ code running on this server” on the server configuration
utility to debug the server code.
35. Can we debug the Business connector code running on the server?
ANS: Yes. By selecting the check box “Enable User break points to debug code running on the
Business connector”.
36. What type of relationship we can define for an extended Data Type ?
ANS: If you would like to use virtual companies at some time in the future, it is best to set up the
virtual companies from the beginning of the implementation of Microsoft Dynamics AX. This avoids
problems with combining records into a shared table at some time in the future.
38. Before you can create or modify a virtual company account what must be established?
The application object server that the administrator is connected to must be the only one running. All
other application object servers must be shut down.
Only the administrator who is creating the virtual company account can be connected; only one active
client connection is allowed.
After you create or modify a virtual company account, you must restart the Microsoft Dynamics AX
client in order to update the client with the new virtual company account information.
39. How u can check that for a particular SQL call RLS is applied or not?
ANS: Using Database trace. Database trace should be activated for this. For RLS applied statements it
will show like this salesLine.select () (RLS)
40. What is the difference between the Client kernel and Business connector kernel?
The Session Manager in the client kernel manages only a single instance--in the Business Connector
kernel, it manages multiple instances.
The client kernel includes forms security, while the Business Connector kernel does not.
ANS: Yes
46. If yes Then Can we extend the table as similar to class? If yes then how it is possible
and if no then why?
ANS: abstract, client, display, edit, final, public, private, protected, server, static.
Modifier Description
Modifier Description
static Static methods are accessed via class declarations. Fields can’t be accessed from within a
static method.
final Final methods can’t be overridden by methods with the same name in derived classes.
abstract Abstract methods have no implementation. Derived classes must provide definitions for
abstract methods.
server Server methods can execute only on an Application Object Server. The server modifier is
allowed only on static methods.
client Client methods can execute only on a MorphX client. The client modifiers are allowed only on
static methods.
display Display methods are invoked each time a form or report is redrawn. The display modifier is
allowed only on table, form, form data, report, and report design methods.
edit The edit method is invoked each time a form is redrawn or a user provides input through a
form control. The edit modifier is allowed only on table, form, and form data source
methods.
48. I want to put final modifier to new and finalize methods? How can I do this where I
need to right this keyword in method?
ANS: You cannot use Final modifiers for the New and Finalize methods.
ANS: It is possible to initialize parameters in the method declaration. This makes the parameter an
optional parameter. If no value is supplied in the method call, the default value is used.
ANS: With X++, you can embed a function inside a method to create a local function (or local
method). The local functions that you can create in X++ are only visible within the scope where they
are defined.
Abstract class
When you create a abstract class, you want to ensure that this class can not be instantiated. You wil
have to create a sub-class that wil actually use the functionality.
Example:
Extends
When you want to create a new class that inherits methods/properties from a other class, you can
‘extend’ the class. A typical example of a class you will extend from is the ‘RunBaseBatch’-class. When
you do this, you will automatically be able to schedule your class.
Example:
Implements / Interface
Sometimes you want to create a blue-print for new classes by creating a ‘Interface’ class. The you just
need to ‘Implement’ the blueprint in you’re new class.
Example:
A.If u want open executable file in from dynamics ax application then u can write following line in your
form on any event where you want .
ANS: ODBCConnection
53. Which are classes are used for data import export?
54. Which is the base class for these two classes above mentioned?
55. Which class will be used to get the object names, security key names / count,
configuration key name/ count etc.?
ANS: Dictionary
Underneed you find the list of shortcuts I use most in Microsoft Dynamics Ax while developing.
CTRL + S : Save.
CTRL + SHIFT + LEFT / RIGHT ARROW : Select one word to the left/right.
SHIFT + HOME / END : Select text from the cursor to the start/end.
CTRL + F : Find.
F3 : Find Next.
Ax specific
Breakpoints
Compile / Run
ANS: IO
57. How can we get the no. of table available in Ax through code?
58. Which class will be used to get the online users info?
ANS: SysUsersOnline
59. Which is the mandatory parameter needs to be passed while creating the ODBC
connection class object?
60. Which all classes will be used to create a com object for excel application?
61. How can we get the client computer name through code?
62. Do you know about List class in Dynamics Ax? Why it is used?
ANS: Lists are structures that can contain values of any X++ type. All the values in the list must be of
the same type.
ANS: Curusrid();
ANS: ChangeCompany(‘companyName’);
65. From which table u can get the user permissions stored in Ax?
ANS: This table stores the list of virtual companies available in Dynamics Ax.
67. What all are aggregate functions available in select statement of X++?
ANS: Updates the current record with the contents of the buffer.
ANS: The doUpdate method should be used when the update method on the table is to be bypassed.
SysQuery::countTotal(queryRun)
SysQuery::countLoops(queryRun)
Q) If you are facing Error”Not enough right to use table Abc ”.What can do?
4. in the name of the company accounts field, type virtual company for intercompany
8. Click the left arrow to move the company to the selected company accounts list
9. add the”CEE” company and “CEU” company to the selected company accounts list
11. click the first table collection in the remaining table collections list.
12. click the left arrow to move the table collection to the selected table collections list.
13.add the global and intercompany table collections to the selected table collections list.
14. Close the virtual company accounts form and then click OK to close the application.
71. What should we use to increase performance while inserting, updating or deleting
records from a table?
RecordSortedList: Allows you to insert multiple records in one database trip. Use the RecordSortedList
construct when you want a subset of data from a particular table, and when you want it sorted in an
order that does not currently exist as an index.
RecordInsertList: Allows you to insert multiple records in one database trip. Use the RecordInsertList
construct when you do not need to sort the data.
insert_recordset: Allows you to copy multiple records from one or more tables directly into another
table on a single database trip.
update_recordset: Allows you to update multiple rows in a table on a single database trip.
delete_from Allows you to delete multiple records from the database on a single database trip.
ANS: No
73. What is must to be declared for a control to get accessed anywhere in the form?
ANS: In the control properties set the Auto declaration property to yes.
74. What should we do if we need last record to be active when a form is opened?
Active
Delayed
Passive
InnerJoin
OuterJoin
ExistsJoin
NotExistsJoin
76. What are the three basic nodes found in Forms Node?
Methods
Data Source (The Data source defines the interface between the form and the database)
Design (The design of the form defines the interface between the form and the user and controls the
layout and presentation of the data).
77. What for Formrun Kernel class and FormDataSource Kernel Class are used?
A. Formrun Kernel class is used to control the Startup and Shutdown of the form.
FormDataSource Kernel Class contains the methods which are used for Displaying, Validating and
Updating data in forms.
The objects for each data source and data fields defined are inherited form which kernel class?
(Data Source)FormDataSource which has methods related to displaying, validating, and updating
data.
(Data Field)FormDataObject which has methods related to field specific navigation (filter, lookup, jump
to main table etc.), validating and modifying the field.
78. What properties are to be used and set in a form for automatically creating a new
record in it?
Set the InsertIfEmpty Property to yes if the forms do not find any data
Set the InsertAtEnd Property to yes if the user browses past the last record in the data source (Note:
If the user browses past the last record in the data source)
If we are to put the X++ code in the form, try to avoid programming on the design and put our logic
on the data source. Many events on the design are very dependant on exactly how the user is
navigating the form. The programming on the controls does not take the user possibility to modify the
contents of the form into account.
ANS: This method initializes the form and its objects and is the first event we can override in
connection with the start up of the form.
ANS: Never remove the super () call from this method, as this removes the initialization of all the
objects.
ANS: If you want to make some manual initializations this is typically placed in this method. This could
include the following tasks:
ANS: This method shuts down the form. If we have some cleanup in connection with finishing the
execution of the form, this will be the place.
Ex:- forms/forecastpurch/methods/close.
This method initializes the data source and is called from the super () of FormRun.Init (). The method
will only be called once when the form is opened.
The main task for this method is to initialize the query used for fetching data.
If we want to modify or replace the query automatically created by the form, this should be done after
the super () call of this method.
This method is used to initialize a new record with default values. The super () of this method calls the
corresponding method on the underlying table, which in turn invokes the record template
functionality.
If we have some initialization which should apply system wide, you should place the code on the table.
87. FormDataSource.Active Method?
This event is called when a new record becomes active in the data source and is typically overridden
to change properties which depend on the contents of the current record:
Enable/Disable buttons
ANS: AutoDesignSpecs
ANS: 1
91. If AutoHeader property of the query is set to Yes, where will this get reflected?
ANS: Report
92. Through overriding of which method of report we can restrict the user to see only
certain records which are not possible through the range method?
ANS: Fetch
93. Through overriding of which method we can hide the columns or parts of report?
94. If the design is similar for more than one report what is the best solution in developing
such reports?
ANS: we can add many. But adding many will slow down the query performance.
3. How can I see the result of the Query written in Queries node in AOT?
EX write a query to get all the customers from the custtable where custgroup belogs to 50 and
currency is “CAD”.
qr1=qbr1.addRange(fieldNum(custtable,dataareaid));
qr1.value(strfmt('((CustGroup=="%1") &&
(currency=="%2"))',QueryValue("50"),QueryValue("CAD")));
5. When using the Enum in the Range filed of the Query, What should be used? Enum
value or Enum ID?
ANS: Determines whether the data sources should be related through a 1:1 relation or a 1:n relation.
ANS: Determines if a group total is printed when the value in this field changes.
8. What are the best practices for creating the variables in the class?
ANS: Do not create object member variables that do not hold the state of the object. Pass these
values as arguments.
Do not create an object member only because a variable of that type and name is needed in more
than one method in the object. Create the variable in each place it is needed.
ANS: If you have to declare some constants that will be used in more than one method in the class or
its subclasses, declare these constants in the class declaration (by using the #define technique).
10. What is the use of init method of a class and what are the best practices checks for it?
ANS: Yes if you need to carry out any special initialization tasks after class instantiation and after the
setting of class variables by using accessor methods, such logic should be placed in a private method
called init.
Init methods should be protected, and should have a void return type, or else a Boolean return type if
initialization can go wrong, so that an error can be thrown.
The finalize method will destruct an object when it is called, regardless of how many references there
are to that object.
There are no implicit calls to finalize; it is not called automatically when the object is destructed. If
you define a finalize method, you must have explicit calls to it.
12. What is the use of client and server modifiers for a method?
These qualifiers are used for Application Object Server (AOS) tuning, where the task is to minimize the
traffic between the client and the server. They are relevant only for table methods and static class
methods, because other methods (class instance methods) run where their class is instantiated.
If a method is running on the server and only makes a single call to the client, it is okay to keep it on
the server. If a method makes more than one call, move it to the client and then return it.
If a method is running on the client and only makes a single call to the server, it is okay to keep it on
the client. If a method makes more than one call, move it to the server and then return it.
It does not use the instance member variables or fields that are defined for the class.
It is related to the class or table, but it does not have its origin in a single object (instance).
ANS: Use the abstract qualifier when a method has to be implemented in a subclass. Even if it has no
effect, it serves as documentation.
ANS: The AOSAuthorization table property enables you to specify which data access operations must
undergo user permission checking.
29. What are fundamental data access operations for AOS authorization table property? And
how one can use it?
ANS: The four fundamental data access operations are create, read, update, and delete. These
operations are represented in combinations by the following AOSAuthorization enumeration values:
None
CreateDelete
UpdateDelete
CreateUpdateDelete
CreateReadUpdateDelete
No permission checking is done when the AOSAuthorization property is set to none.
Suppose AOSAuthorization is set to CreateDelete on a given table. In this case, create and delete
operations would be allowed to execute only if the Application Object Server (AOS) can confirm that
the user has the appropriate permissions.
30. What is default value of AOSAuthorization table property when a new table will be
created?
ANS: When a new table is created, its AOSAuthorization value is set to none.
ANS: Yes
Code Access Security (CAS) helps protect APIs that have potential security risks when the APIs are
running on the server.
CAS-enabled APIs called on the server require the use of a permission class—one of the classes
derived from CodeAccessPermission.
Implicit authorization
Checks done by setting security properties on Application Object Tree (AOT) objects
A. The runbase class is an abstract class which defines common structure for all data manipulation
functions in ax.
Class declaration
Dialog
getFromDialog
pack
unpack
run
description
main
Q) Derive from Derived RunbaseBatch classes?
A. We all know how to extend from a runbaseBatch. But you have to be cautious if you extend from
that derived class again. You still want the integration with pack/unpack the correct way.
Example: We want an additional text field on the dialog when posting a movement journal. For this
example we have to override the next methods:
Dialog
getFromDialog
pack
unpack
Fields and variables related to from account and to account should be removed from class declaration
getFromDialog() and validate()
Modify the run() method to use queryRun() to fetch the records in ledger table.
Modify the dialog method to take the correct parameters and insert call to a super()
If the caller activating the called by object by a menuitem the args object is automatically initialized
and set a parameter to the object called. AOT properties of the menuitem will be used.
3. Table collections?
6. Collection classes
7. Tables in inventory
Methods
Data Source (The Data source defines the interface between the report and the database)
Design (The design of the form defines the interface between the report and the user and controls the
layout and presentation of the data).
Application classes: are implemented in X++. They are available in the Classes node in the AOT.
System classes :sometimes called kernel classes, are implemented in C++. They are listed under the
System Documentation > Classes node in the AOT.
No
General questions:
Client: this is the presentation layer. This is where the forms are stored. Place client specific classes
and methods here.
AOS: the business application logic layer. Transaction oriented database updated jobs should be done
here, close to the database.
Database server: the database layer. Utilize the power of the database server by using aggregate
functions, joins and other calculating features of the database management system.
A. Application:This is where all the business logic and metadata definitions reside like forms, reports,
menu’s etc…
AOS: this is where the application is executed and data access performed in thin mode.
Client: this is where interaction with the end user is handled and data is performed in fat mode.
103. What is the Software Req. for installation of a AX4.0 and E.P?
AX4.0
Windows installer
Internet explorer
For E.P:
.net framework3.0
Web:the EP module,roles related to this module.other modules integrated to this module and the no.
of EP users.
ANS: No, Only Option available is 3 tier configurations with a thin client.
2. What type of changes are there in Axapta3.0 and AX4.0 related to recid?
Runbase framework
Batch framework
Dialog framework
Numberseq Framework
AIF
Workflow
Wizard framework
Syslast value framework
Infolog framework
Sometimes when you want to share data in your tables with other, you export it from Administration
-> Periodic -> Dataexport/import -> Export to. But this exports data in all your tables. What if
you want to export data from selected tables only? Here is how you can do that.
First create a definition group from Administration -> Periodic -> Data export/import ->
Definitions group
By default, the table setup form has all the tables listed, select and delete all of them.
Now add only the tables you want data to be exported for.
Now click on Administration -> Periodic -> Data export/import -> Export to
In the definition group, specify the group we created above and click OK
In this way, you can export data for selected tables only.
35. How to Refresh Dictionary, data, AOD and Reindex, Usage data in Ax?
VAR layer
Layers concept:
The advantages to the layered architecture of Microsoft Dynamics AX 2009 include the following:
* Any user of the Microsoft Dynamics AX 2009 application can customize the Microsoft Dynamics AX
2009 application
above if the object exists in a higher layer. Every time an object is opened, the system automatically
searches for and uses the object files needed in the highest layers first
Each layer is saved in a separate file that has an extension of .aod.
For example,
Axsys.aod is the SYS layer. The aod extension is an acronym for Application Object Data file.
The layers are designed for different Microsoft Dynamics AX 2009 developer.
Business partners and developers who want to enhance Microsoft Dynamics AX 2009
The innermost layers (SYS, GLS, HFX, SL1, SL2, and SL3) are the standard layers in Microsoft
Dynamics AX 2009:
SYS - The innermost layer is the System or SYS layer. This is where the standard Microsoft Dynamics
AX 2009 application is implemented
GLS - Local Microsoft Dynamics AX 2009 offices are provided with a Global Localization or GLS layer
for country-specific functionality
HFX - The application layer that may be used for on-demand hot fixes
SL1, SL2, and SL3 - The SL1, SL2, and SL3 layers are managed by distributors and are used for
vertical partner solutions
NOTE: Object ID's in the standard layers are in the range of 1-20000.
The four outermost layers (BUS, VAR, CUS, and USR) are modified by developers or end-users:
BUS - Business partners can develop and distribute vertical and horizontal solutions to other partners
and customers using the Business Solution or BUS layer
Solutions in the BUS layer are protected by the same license code framework the standard application
uses. The BUS layer is reserved for the Add-on Solution program and requires a signed agreement to
use for development and distribution. BUS layer Object ids’ range from 20001 - 30000.
VAR - Business partners access a separate layer, the Value Added Reseller or VAR layer without
business-related restrictions. This means that any developments can be added to this layer The
business partner must keep a catalog of application functionality and VAR configurations customers
have implemented to update installations correctly.
The Customer layer supports in-house development without jeopardizing modifications made by the
business partner. This means application code made in the VAR layer cannot be changed. CUS layer
object id's range from 40001 - 50000.
USR - The USR layer enables individual companies or companies in an enterprise to use this layer to
make customizations that are unique to the customers’ installation that includes reports by using the
report wizard. The USR layer object id's range from 50001 – 60000.
ANS: Cross-references to other Microsoft Dynamics AX objects are now name-based and no longer ID-
based. If you rename an object, you need to update all the references to it.
ANS: The GLS layer has now been merged into the SYS layer. A new SE layer has been introduced.
The IDs for the SYS layer are now 1-14000. The IDs for the SE layer are 14001-16000.
25) How to set and know the session time, companyname,user id,aos server..etc in ax?
A) Administrator>Tools>Options
A The MorphX Development Suite is the integrated development environment (IDE) in Microsoft
Dynamics AX 2009 used to develop and customize both the Windows interface and the Web interface.
An IDE integrates development functions such as designing, editing, compiling, and debugging within
a common environment.
With MorphX, common operations such as building or modifying forms, menus, and reports are done
using drag-and-drop techniques with little or no coding.
IntelliMorph is the technology that controls the user interface in Microsoft Dynamics AX 2009. The
user interface is how the functionality of the application is presented or displayed to the user. The
same functionality can be displayed on multiple platforms or devices that use the same application
code;
IntelliMorph controls the layout of the user interface and makes it easier to modify forms, reports, and
menus.
ANS: No. Ax has only 3-tier installation whereas Axapta3.0 supports both 2-tier and 3-tier.
13. What type of changes are there in Axapta3.0 and AX4.0 related to recid?
14. What are the 4 types of files we need to copy to the standard folder?
ANS: Virtual company accounts contain data in certain tables that are shared by any number of
company accounts. This allows users to post information in one company that will be available to
another company.
A. Indicates that the method's return value is to be displayed on a form or a report. The value cannot
be altered in the form or report.
A. *.ALD (A text file containing all labels for the label file id )
*.ALC (comments added in the label system are stored in this system)
*.ALI (index file for the label file id. if the file is missing the file will automatically created first time the
label system is accessed )
Private: These projects are only visible to the user who are created the project. You should only use
private projects for testing purposes or similar tasks.
Shared: These projects are visible to all the users. Using shared projects means that more than one
developer can work on the project at the same time.
To create a project right click the shared or private and choose a NEW there are three types of
projects(project, sysTestproject, helpbook) .The first project type just called projects the default
project type. The other two project types web projects and helpbook are created by using X++.
ANS: Microsoft Dynamics AX now has an integrated Unit Test Framework built into the MorphX
development environment. Unit tests are made as individual test cases. Each test can include a
number of tests in the form of assertions. Test cases can be contained within test suite classes or as
part of a project in MorphX. Testing can be done from the Unit Test toolbar from which individual test
cases, test suites, or test projects can be executed. Test results can be viewed from the Unit Test
toolbar that indicates the test passed or failed state, per case and test, and can even include code
coverage measures for the classes and methods that are tested.
Tools Development Tools Unit Test
70. What is the difference between X++ and SQL sort command in select statement?
ANS: X++ does not allow group by and order by clauses in the same select statement. This means
that explicit sorting is not possible. SQL does allow group by and order by clauses to be in the same
statement.
Q) How to run a single batch process that processes jobs for multiple companies in
Microsoft Dynamics?
A.In Microsoft Dynamics AX 4.0, a batch process or a batch server can process jobs for only one
company. However, a virtual company can access the batch table collection for other companies.
When you add jobs to a batch group, Microsoft Dynamics AX 4.0 inserts the virtual company identifier
in the DataAreID field. When you run the batch process, the batch process treats all the records in the
batch process as records from one company. Additionally, the batch process works as a central batch
server.
When companies belong to a virtual company, you can create a batch group for a company that
belongs to the virtual company. This batch group is then used by the other companies. This feature
lets you run one batch process that processes jobs for multiple companies. To do this, follow these
steps:
In the Main menu dialog box, point to Administration, expand Setup, and then click Virtual company
accounts.
In the Virtual company accounts dialog box, press CTRL+N, and then type a company account name
in the Company accounts field.
Click the Company accounts tab. In the Remaining company account list, select companies for which
you want to run the batch process, and then click the left-arrow button.
Click the Table collections tab. In the Remaining table collections list, select Batch, and then click the
left-arrow button.
Click Save, and then close the Virtual company accounts dialog box.
Run the batch process by using a company that belongs to the virtual company.
DataDictionary:
A. The AoT is organized to contain all elements that relate to how the data is stored in the database
and those that relates to security such as security, configures and license keys. The data dictionary
node contains tables, maps, views, EDT’s, baseenum, license, security, configuration key’s, table
collection and perspectives.
79. Different Properties of a field?
Allow Edit: This property specifies whether the field can be changed. This property can't remove a
restriction imposed by the table field, security settings, or the data source.
Enabled: The enabled property specifies whether the user can access the control. If the field is
disabled it will be grayed and the used cannot give focus to the control.
Visible: This property can be used to remove a field from the user interface. The same property exists
on the database field and should be specified here if the option should apply system wide.
Allow Edit: This property specified whether the field can be added to the design by the user. Because
the default value is restricted, the default behavior of forms is set so that extra information cannot be
added to the form.
The AllowAdd property on the datasource field must allow the field to be added.
The container where the field is to be added must allow full user setup
Mandatory: This option determines if it is required to fill in data in this field. The same property
exists on the database field and should be specified here if the option should apply system wide.
A. The delete_from statement enables you to delete multiple records from the database at the same
time. This means that there is only one call required to the database from the Microsoft Dynamics AX
client as opposed to the multiple calls required if you use the delete statement.
This reduction in the number of calls required speeds up system performance. It also enables you to
specify multiple deleted items in a clearer, simpler manner.
In situations where the delete method is overridden, the system transparently emulates the situation
of selecting and deleting one record at a time so that the overridden delete method is executed.
ANS: An index is a table-specific database structure that speeds the retrieval of rows from the table.
Indexes are used to improve the performance of data retrieval and sometimes to ensure the existence
of unique records.
107. What are the differences between primary and unique index?
Primary Key uniquely identifies the record and the UNIQUE index on the primary key ensures that no
duplicates values will be stored in the table.
1) Primary key creates an implicit clustered index on a table, unique key does not create any implicit
index
2) Columns defined as primary key does not allow null values,where as columns defined as unique can
allow null values.
3) A table can have just one primary key (can be a composite key) where as there can be multiple
unique columns (keys).
4) Primary key is a unique key with the above mentioned features Amol
System-defined methods – automatically available on every table. These methods are from the
xRecord system class.
A. In the Application Object Tree (AOT), under the Data Dictionary node, there is a Perspectives
node. A perspective is a collection of tables and views that contain the measures and dimensions for
a cube.
A. Perspectives are used to create OLAP cubes and generate SSRS reports, and table collections are
used to setup virtual companies in the AX database. Their content might look alike in the AOT but the
purpose is completely different.
The doUpdate method should be used when the update method on the table is to be bypassed.
Data in containers are stored and stored sequentially, but a temporary table enables you to define
indexes to speed up to data retrival.
Container provides slower data access if u are working with many records. However if u are working
only few records use a container.
When u pass a temporary table into a method call it is passed by reference, containers passed by
value.
When a variable passed by reference only a pointer to the object is passed into the method. When a
variable passed by value, a new copy variable of the variable is passed into the method.if the
computer has a limited amount of a memory,it might start swapping memory to disk, slowing down
application execution. When u pass a variable into a method, a temporary table may provide better
performance than a container.
A. Extended data types (EDTs) are user-defined types, based on the primitive data types Boolean,
integer, real, string, and date, and the composite type container. You can also base EDTs on other
EDTs.
A. Table level
When you use the index keyword in a select statement the kernel will translate this to a order by
command and the database optimizer will chose the best index to actually use. When you chose to use
the index hint keyword in your select statement, Ax will force the database to use the chosen index.
The newDateTime() function is defined in the DateTimeUtil class and it is a utility function that creates
a new UTCDateTime object. With addDays() you can add a certain amount of
ANS: Yes
ANS: Microsoft 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.
21. What will happen if one add a delete action to a table and use delete_from statement?
The indexes in the Microsoft Dynamics AX 2009 table definition are the physical indexes that exist on
the tables in the database. There are two types of indexes:
1. Unique 2.Non-Unique
If a unique index is created based on a column (or a set of columns), Microsoft Dynamics AX 2009
makes sure that no duplicate keys occur in that column (or set of columns).
Non-unique, or cluster indexes, are created for performance reasons. They provide a quick way of
retrieving data, instead of performing a full-table search of all the records in the table.
34) Wt is relations?
Microsoft Dynamics AX 2009 can create relationships between tables using MorphX.
These relations are defined within the Microsoft Dynamics AX 2009 application and not at the physical
database level.
Relations govern the relationships between data in different tables and extended data types, such as
foreign key relationships.
Foreign key relationships between tables are always formed from the parent table.
Form the relationship starting with the subordinate table; it is not necessary to go back to the parent
table.
FIGURE 2.10 FOREIGN KEY RELATION
Under the relations node you can create different types of relationships between the parent table and
other tables in Microsoft Dynamics AX 2009.
The following figure shows the different types of relationships that exist for CustTable. There are
nodes for a variety of different Relations such as BankAccounts and State.
Cascade:
A cascading deletion action will delete all records in the related table, where the foreign key is
equivalent to the primary key of the current table. That is, deleting the parent record will also delete
the child record(s) in the related table.
This cascading will take place whether the deletion is performed in code or directly by a user through
the user interface.
Restricted:
A restricting delete action will raise an error message if the user tries to delete a record, where
records exist in the related table where the foreign key is equivalent to the primary key of the current
table.
This error will only appear if the deletion is performed through the user interface. A deletion from X++
code will be allowed to proceed and will not be cascaded to the related table. In this case the
programmer should call .validateDelete() themselves prior to the call to .delete()
Cascade+Restricted:
This delete action normally works as a Restricted delete action. However if the deletion is performed
through X++ code, no error will be raised and the deletion will be cascaded to the related table.
36) What is array element in EDT?
A. You can create an extended data type in the Application Object Tree (AOT) that contains multiple
elements. This enables you to store multiple data elements in a single field that is based on this
extended data type
When you create a form based on a table that contains a field of the MyAddress type, MorphX
automatically generates a field on your form for each element in the MyAddress definition. The
definition of the MyAddress type above causes 3 fields to be generated on a form, called Address,
Address1, and Address2.
Expand the relevant extended data type, and then locate the Array Elements node.
Right-click the Array Elements node, and then choose New Element in the shortcut menu.
Display the property sheet for the element, and then rename the element by changing the Label
property.
To specify the plural name of the element, use the CollectionLabel property.
To display a help string when using the extended data type in a form, use the HelpText property.
ANS: Configuration keys allow administrators to enable or disable features in the application for all
users. Disabling features helps to minimize the attack surface against potential attacks.
ANS: Configuration keys are applied by setting the Configuration Key property on these objects in the
Application Object Tree (AOT).
24. Can we apply a configuration key on table field and report’s control?
ANS: Yes
ANS: Yes
ANS: Security keys allow administrators to set security on a user group level. Minimizing access on a
user group level helps to reduce the attack surface against potential attacks.
27. What are all the main reasons to apply user-level security?
Prevent users from inadvertently breaking an application by changing code or objects on which the
application depends.
41. What Type of cache you will apply for most static data
ANS: Found
43. When there are common methods across tables, which will be the best option to create?
ANS: Create a map and add those methods and corresponding tables
A. A Microsoft Dynamics AX view is a virtual table that contains the data records and fields that are
specified by a query.
When you create a view, the view definition is generated and stored in the database. When that view
is accessed, the view dynamically retrieves the data that satisfies the view definition.
Views are read-only. The data fields and tables that a view uses cannot be updated from that view.
A. Like a table, a view uses fields and rows to represent data records. However, the data in a view is
not stored as a database object but is dynamically created when the view is accessed. A view uses a
query to retrieve data fields from one or more database tables.
In Microsoft Dynamics AX, you can use views where you use tables.
Views are located in the Application Object Tree (AOT) under the Data Dictionary\Views node. A
view contains four primary nodes:
Metadata
Fields
Field Groups
Methods
Metadata
The Metadata node contains the query or data source that the view uses to retrieve data. A metadata
query or data source is referred to as the view query. For more information about how to use a query
or data source, see the View Query section later in this document.
Fields
The fields that view populate from the specified data sources.
A view can return aggregate fields that use the functions SUM, MIN, MAX, AVG, and COUNT. Field
aggregation is specified in the Aggregation property of the field. In Microsoft Dynamics AX, views
support only field-level aggregation.
To use the aggregation functions of COUNT, AVG, or SUM, the data field must be a data type of
Integer or Real. If you try to use one of these aggregation functions on a field of any other data type,
you will receive an error
Field Groups
The Field Groups node contains the field groups for a view. A field group enables you to associates
fields that logically belong together into named groups. Field groups in views work just like they do in
tables.
Methods
The Methods node displays all the methods available from a view. Use this node to add a new method
or override methods on the xRecord kernel class. Methods enable you to add code that customizes a
view.
This gives the information of method calls in the form level while
http://www.doens.be
http://dynamicsaxsol.blogspot.in
http://daxfaq.studioerudit.com