Question
and Answer
1
1. What is the type of
relations /what relations are allowed on EDT / What if there is relation on
one field which is present
on EDT as well as Table?
Normal & Field
Fixed Relation:
LedgerJournalTrans
which contains manually entered journal lines. Depending on the
account type, when
the user selects the Lookup button on the account field, a different
table will be
selected such as ledger, customer or vendor tables. If you check the
Relations
LedgerTable, CustTable and VendTable in the table LedgerJournalTrans, you
will notice the
relations are created using two normal relation fields and one field fixed
Relation for the
account type.
Related Field Fixed:
Display only invoiced
sales order based on sales status enum.
An
Extended data type can also have a relation to a table. However, if a table has
relations on the
same
field, the table relation will overrule an extended data type relation.
On
table we can define all 3 types of relations but on EDT we can define only
Normal and related
field
fixed relation.
2. Can we change the size
of string type EDT if it extends to other EDT, e.g.
EDT 1: ItemID extends
ItemIDBase (string size: 20) so default size of ItemId is also 20, so can
we change the string size
of ItemID?
NO, we can only
change the display height and length by EDT property but not the size
of the ItemID EDT.
3. What is application
object ID’S? E.g. ID property on Table?
Several application
objects are stored and referenced internally by using IDs rather than
names. These
application object types are ID-based: tables, fields, indexes, maps,
extended data types,
base enums, configuration keys, security keys, and classes.
Having ID-based
application object types allows you to change the name of one of these
object types and
immediately see the change reflected everywhere that the application
object is referenced
by its ID.
Others who make
modifications or additions in another layer to the application you
supply, for example
in the BUS Layer, store their modifications by using the IDs. They
rely wholly on the
IDs in the application you supply.
When you supply a new
version of your application, the modifications or additions that
others made to the
original version of the application work only if the IDs in the
application objects
you supplied are not changed.
Note
X++ code is
name-based. This means that when an application object is renamed, you
need to go through
everywhere the object is not referenced by its ID. X++ code and
inherited classes
will generate compile errors.
Question
and Answer
2
4. Table main
properties such as FormRef, MaxAccessMode uses :
FormRef
Specifies the display
menu item that is activated when a table is referenced. A display
menu item is
associated with a form.
When you use a
primary index field on a report, this form is available as a link in the
report. A primary
index is specified by using the PrimaryIndex property.
If you leave this
field blank, the system attempts display a form that has the same name
as the table.
ReportRef
Specifies the output
menu item that is activated when a table is referenced. An output
menu item is
associated with a report.
When you use a
primary index field on a report, this report is available as a link in the
report. A primary
index is specified using the PrimaryIndex property.
TitleField1,
TitleField2
Enables you to do the
following:
Add table field data
to a form caption.
Display additional
fields in a lookup form. For more information, see Create Lookup
Forms. The
TitleField1 property is also used when activating the lookup list in a field on
a form. The fields
you specify for TitleField1 and TitleField2 properties can be merged
with the key value.
Temporary
Marks a table as
temporary if you need to gather temporary information in a table format.
Temporary tables are
not persistent. They are written to local disk storage, but not stored
in the database.
SystemTable
Indicates if a table
appears as a System table. It can then be filtered out during export and
import.
System tables are
always synchronized when you log in. This may be useful for tables
that you use as soon
as you log in.
MaxAccessMode
Specifies the access
rights when the table is used as a data source in a form or a report.
If the table is used
as a data source in a form, then the access rights in the form cannot
exceed the access
rights defined for the table.
Options : Default :
NoAccess,view,edit,add & delete
AOSAuthorization
Specifies the type of
operation that a user can perform on a table, depending on the user's
permissions.
When the property is
set to None, an authorization check is not performed.
Question
and Answer
3
CacheLookup
Determines how to
cache the records retrieved during a lookup operation.
Default :
None,NotIntts,found,foundAndEmpty & EntireTable
SaveDataPerCompany
Indicates whether the
data for the current company is saved.
If you set the
property to No, data is saved without a company identifier (DataAreaId).
OccEnabled
Specifies whether the
optimistic concurrency mode is enabled for a table.
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.
5. What are field
groups on table?
Field groups are
widely used when creating forms and reports. Instead of adding fields
one by one to a
design, you should add field groups. If a field group is later changed, e,g,
when adding a new
field to a group, then the new field will automatically be available
everywhere that
specific field group is used.
6. What are delete
actions on table?
To assure data
consistency delete actions are used.
Options:
Restricted: prevent
deleting a record that is used in related tables.
E.g. System does not
allow deleting customer if transactions exist
Cascade: will delete
related records.
Cascade + Restricted
: A delete action can be set to a third mode called “Cascade +
Restricted”. This
delete action mode will act as restricted if used from the table browser
or from a form.
Deleting a record
using X++, this mode will perform a cascade delete from the related
table without calling
validateDelete().
ttsbegin;
select
forupdate myTable where myTable.accountNum == "10";
if
(myTable.validateDelete())
myTable.delete();
ttscommit;
When
deleting records using X++ some rules must be followed to have the delete
actions
validated. In this example a record is fetched from MyTable. Before the record
is
deleted a validation is made. If the record was just deleted without calling
validateDelete(),
the delete action would not be validated, which could cause
inconsistent
data.
Question
and Answer
4
7. What are the types
of indexes used on table? Pros and Cons? What is use of Index
Hint?
There are two main
types of indexes that we can have on a Microsoft SQL Server
backend Database.
These are normal and clustered indexes. Normal index can be viewed
as the index in the
back of a book. We first look in the index for a topic. After finding the
topic in alphabetical
order we also find the page number or address of the topic in the
book. We then use the
address to easily find the topic. If we did not have this index we
would have to search
sequentially through the book and the larger the book the greater
the effort and time
to either find a topic or realize that it does not exist.
This is similar to a
normal index in the database where we have the data stored in one file
and the index stored
in another file in the order specified. The database engine using the
index will first look
in the index file then retrieve the address of the record that is used to
locate the record in
the data file.
For clustered index
the records in the data file are sorted in the order of the index. We
therefore do not have
a separate index file from the data file as we have for normal index.
You should also note
that it is only possible to have one clustered index per table, since
the records may only
be sorted in one order at any time. You can have several normal
indexes and one
clustered index for each table. Clustered indexes are more efficient since
the index is the
actual data records and hence you do not need to seek in another file after
finding the key.
The Primary Index of
a table is the main index that is used to uniquely identify records in
it. No duplicated
values are allowed in this index and all fields in the index are required.
You can designate a
clustered or normal index as the primary index. Since the primary
index is the main
index you should gain optimum performance by designating a clustered
index for this
purpose.
Please note that
indexes in general improve performance for search but not for inserts or
update, since the
overhead of organizing and or writing the index is involved.
Index hint
Gives the database
a hint to use this index to sort the selected records as defined by the
index. The database
can ignore the hint.
Note
A
wrong index hint can have a big performance impact. Index hints should only be
applied
to SQL statements that do not have dynamic where clauses or order by clauses,
and
where the effect of the hint can be verified.
Question
and Answer
5
8. What is Link type
property on form data source? Type of joins? Use of Link active
method on form data
source?
LinkType Property
Options : Use Passive,
Delayed, and Active when you join data sources that have a
parent/child
relationship, and InnerJoin, OuterJoin, ExistJoin, and NotExistJoin should
be used when joining
data sources to appear as one data source.
Passive
Linked child data
sources are not updated automatically. Updates of the child data source
must be programmed on
the active method of the master data source.
Delayed
A pause is inserted
before linked child data sources are updated. This enables faster
navigation in the
parent data source because the records from child data sources are not
updated immediately.
For example, the user could be scrolling past several orders without
immediately seeing
each order lines.
Active
The child data source
is updated immediately when a new record in the parent data
source is selected.
Continuous updates consume lots of resources.
InnerJoin
Selects records from
the main table that have matching records in the joined table and
vice versa.
There is one record
for each match. Records without related records in the other data
source are eliminated
from the result.
OuterJoin
Selects records from
the main table whether they have matching records in the joined
table.
ExistJoin
Selects a record from
the main table for each matching record in the joined table.
The
differences between InnerJoin and ExistJoin are as follows:
When
the join type is ExistJoin, the search ends after the first match has been
found.
When
the join type is InnerJoin, all matching records are searched for.
NotExistJoin
Select records from
the main table that do not have a match in the joined table.
If
calling a related sub form, linkActive() will be called each time a new record
is
selected
in the main form. LinkActive() will call executeQuery(). See form
MarkupTrans.
Question
and Answer
6
9. What are form
control methods? How to color form grid lines? How to color all form’s
background color based
on the company?
The following methods
are executed in the listed order when a form is
opened and closed:
init() _ ds init() _
run() _ ds executeQuery() _ canClose() _ close()
To color form grid
lines display option() method is used
SysSetupFormRun
is the application class that is called by the system every time
a user
runs a form. The
best place to add our custom code is to override the run() method and
place it under the super().
We use this.design()
to get a reference to the form's design. By calling colorScheme() and
backgroundColor(), we
set the color scheme to red/green/blue and the color code to red.
10. What is
transaction tracking system / tts?
Transaction Tracking
System normally referred to as TTS is used for tracking
transactions. The
idea is to secure the entire transaction to be committed to
the database. This is
vital for a relational database and even more for an ERP system.
Whilst performing an
invoice posting you must ensure that this does not result in
corrupt data if the
system crashes. TTS secures that all database operations within a
TTS loop are
committed entirely or not.
Every time you are
performing an insert, update or delete you should use the TTS. In
fact you cannot
update a record without doing it in a TTS loop. A TTS loop is
initialized by using
the keyword ttsbegin. The keyword ttscommit will write all data
operations within the
TTS loop to the database. A loop can be aborted by using the
keyword ttsabort,
which will roll back the database to the starting point. If the system
crashes, a ttsabort
will automatically be invoked by the database.
11. What is RecID and
recVersion?
Recid : Unique
Identification of the record
Rec version :
recVersion field gets whenever record is updated.
12. What is Cross
reference, code profiler, Reindexing ?
Cross reference: Tool
to know where objects, labels, variables are used in the system
Code profiler:
Calculates execution time of the query
Reindexing:
Regenerates the indexes. i.e. axapd.aoi() file is recreated. At SQL, system
adjusts the fill
factor and removes dirty pages from the db which improves the
performance.
Question
and Answer
7
13. How to perform
data migration in production environment without taking company
data backup from ax or
sql db backup? What Class is used while importing data? What is
use of import
criteria?
Excel templates are
used for data migration in above scenario.
Import criteria is
used to write code logic before actual data import
Classe: SysDataTableCtrl
is called during excel data import.
Instead of writing
the code on import criteria it is better to write the code logic during
import in import
class. For this we have to specify the table name in construct method
and then create a
subclass to override doinsert() and doupdate() methods called during
import. While
importing data we can validate data by specifying validation level on
definition group
None : Sytem will not
validate data before inserting/updating
Table : System will
call validatewrite() before inserting/updating
Field : System will
call validatewrite() & validateField() before inserting/updating
14. How to auto kill
ideal sessions in AX after specific time?
Automatic shutdown
option in user options where we can specify ideal session time
If we specify: 20, if
session is idle then it will automatically get closed after 20 mins
15. What is difference
between Axapta Kernel and Axapta Application?
In a 3-tier
installation Axapta Application is stored on AOS, what about the kernel?
Kernel is that part
of the application that is not exposed to the developer for altering. The
behavior of the
kernel is encapsulated in the application and is automatically executed as
originally intended.
For example, when a record is saved the kernel automatically assigns
a RECID to the RECID
field.
The AOS is a windows
service that loads and executes the application in memory on the
local computer where
it is installed. The application may be placed on a drive on the
computer running the
AOS or on a network share.
Question
and Answer
8
16. What is AOS Load
balancing & Clustering?
Load-balancing when
multiple computers are linked together to share computational
workload or function
as a single virtual computer. Logically, from the user side, they are
multiple machines,
but function as a single virtual machine. Requests initiated from the
user are managed by,
and distributed among, all the standalone computers to form a
cluster. This results
in balanced computational work among different machines,
improving the
performance of the cluster system.
Manage AOS load
balancing
You can load balance
across multiple computers that are running Microsoft Dynamics
AX Application Object
Server (AOS) instances.
Set up load balancing
The options for a
load balancing topology include:
· Add
AOS instances to a cluster and run the cluster without a load balancer.
If you set up a
cluster without a load balancer, you can use client configurations to
set clients to
connect to one or more AOS instances that have load balancing
enabled. If an
administrator needs to remove a computer from the cluster, and one
or more client
configuration is pointing to it, the client configuration must be
updated. No
additional hardware is required for this topology.
· Add
AOS instances to a cluster and configure one or more AOS instances to be a
load balancer.
If you set up a
cluster with a load balancer, you must use client configurations to
set clients to
connect to the AOS that has been set as the load balancer. You can
then add and remove
instances from the cluster without needing to update client
configurations.
Additional hardware may be required to set up a computer as a
load balancer.
Add
AOS instances to a cluster
1. Open the Server
Configuration utility (Start > Control Panel > Administrative
Tools
> Microsoft Dynamics AX Server Configuration Utility).
2. Verify that the
currently selected (AOS) instance and configuration are the ones
that you want to
modify.
3. Select Make
this AOS instance part of the load balancing cluster.
Question
and Answer
9
4. Set a value for
the maximum number of client sessions that the AOS instance will
accept.
Set
up an AOS to be a load balancer
1. Open the Server
Configuration utility (Start > Control Panel > Administrative
Tools
> Microsoft Dynamics AX Server Configuration Utility).
2. Verify that the currently
selected (AOS) instance and configuration are the ones
that you want to
modify.
3. Select Use this
AOS instance for load balancing only (accept no client
connections).
Manage members of a
cluster
As part of
maintenance, you may need to temporarily remove and add AOS instances
from a cluster. To
add and remove members of a cluster, you control whether an instance
accepts or rejects
new client connections.
Set
an AOS instance to reject new clients
1. Open a Microsoft
Dynamics AX client.
2. Open the Online
users form. (Administration > Online users).
3. On the Server
Instances tab, select the AOS instance.
4. When the number of
clients connected to the AOS reaches 0, it is safe to perform
maintenance.
Add an AOS instance
to a cluster
1. Open the Online
users form. (Administration > Online users).
2. On the Server
Instances tab, select the AOS instance.
17. What is Reverse
Engineering Tool in Axapta?
Path: Tools->
Development tools -> Reverse Engineer. The Reverse Engineering toll is
used to generate UML
& ER (Entity Relationship: In terms of AX, relationship between
the objects) Diagrams
which shows the relationships between the objects.
Question
and Answer
10
18. Layer structure
differences in AX 4.0 and 2009?
New
Layers in Dynamics AX 2009
4 layers have been
renamed in Dynamics AX 2009. DIS / DIP / LOS / LOP have become
HFX / SL1 / SL2 / SL3
respectively. HFX is reserved for releasing hot fixes, and the 3
new solution layers
(SL1/SL2/SL3) will be used to release Microsoft Dynamics Industry
Solutions.
The purpose of having
3 solution layers is to enable side-by-side install of Industry
Solutions. At
deployment time any SL1 layer can be renamed to SL2, SL3, BUS or BUP
through a regular
file rename. The AOS will recognize the layer, and honor its position in
the layer stack. This
will enable installing up to 3 Industry Solutions on the same system
(or up to 5 Industry
Solutions if the BUS and BUP layers are vacant.)
CUS: This
layer is meant to be used by customization made by the customer itself.
VAR: Partners
use this layer for their customization which is customer specific.
The layer requires
a license code.
BUS: The
lowest layer the partners have access to. Partners can use this layer for their
own modules. The
layer requires a license code.
GLS : Solution
Providers are using this layer. Used for global certified modules created
by sub suppliers
and licensed by Microsoft, such as the CRM and HRM modules.
Question
and Answer
11
19. What are table
collections?
Table collections can
be used to share a table for a part of companies. The benefit is that
you will not have to
change any settings on the existing tables. A new table collection is
created by creating a
new table collection node and dragging the tables to be share to the
new table collection.
A table collection is just a template for tables to be shared by any
number of companies.
Defining which companies to share the tables of a table collection,
is defined from the
main menu.
The form
SysDataAreaVirtual is used to define virtual companies. Table collections are
shared using a
virtual company. You cannot switch to a virtual company like any normal
company. Virtual
Company is just the term used to for sharing a table collection among a
set for companies. In
the form you pick which companies to share specific table
collections. Before
creating a virtual company you should export data for the
tables used in the
table collection, as existing data will be deleted from these tables
when added to a
virtual company.
When using table
collection for setup tables such as customer groups, setting up a virtual
company will be easy.
If you are going to share data from main tables like the inventory
table, you should do
some more investigation as you cannot only share the table
InventTable. You must
include all tables which are related to InventTable.
Q. What is caching
of Display and Edit method ?
The performance of display
methods can be improved by caching them if they are
calculated on
Application Object Server (AOS). Caching display methods can also
improve performance
when records are transferred from the server to the client.
The display method's
value is set when data is fetched from the back-end database, and
the value is
refreshed when the reread method is called on the form data source.
Note
edit
methods cannot be cached.
Add a display Method
to the Cache
1. Locate the form
that the method is used on.
2. Expand the Data
Sources node.
3. Right-click the
data source that the method is associated with, and then select
Override
Method > init.
4. Call the
FormDataSource.cacheAddMethod method after the call to super() in the
init
method.
Question
and Answer
12
The first parameter
for cacheAddMethod determines the name of the method to be
cached. The second
parameter (set to true by default) determines whether the value of
the display method
is updated when a record is written to the database.
public void init()
{
super();
this.cacheAddMethod(tablemethodstr(VendTransOpen,
nextCashDiscDate));
this.cacheAddMethod(tablemethodstr(VendTransOpen,
nextCashDiscAmount));
}
20. What is usage
data? Where it is stored?
When a user changes
the layout of a form, changes the query of a form or enters values in
a report dialog, the
settings will the saved. The usage data is stored in the system table
SysLastValue. Only
one record exists per object per user, as only the value of the last
execution is stored.
If you want to see the usage data for all users, you can call the usage
data form from Tools
| Development Tools | Application Objects | Usage data.
The Usage Data form
shows the content of the system table SysLastValue for the current
user, divided into
tab pages for each type of object. The general tab page has a button to
delete all content of
SysLastValue for the current user. This is quite handy if you are
going to test your
modifications, as you then can start out testing with the same settings
as the application user
will have the first time a form or report is executed.
21. What are Table MAP
and Class MAP?
Table MAP is used for
used reusability. The most common map in MorphX is
AddressMap. Address
information is used in several tables and validation of address
information like zip
code will not differ whether
entered for an
employee or a customer. Mapping all tables using addresses to the same
map will makes it
easy to reuse the code of a map as you will not have to worry about the
naming of fieldnames
in a specific table.
Map (Foundation
class) consist of a data set that contains a key and a corresponding
value, where the key
is unique. The key and the value need not be from the same data
type. A Map is always
sorted on the key value.
To get values from
MAP MapEnumerator/Iterator is used .
MapEnumerator Class
is like MapIterator Class, but does not allow the deletion of
elements during
enumeration. MapEnumerator Class automatically created on the same
tier as the Map
Class, and MapIterator does not so its better to use enumerator over
iterator.
Question
and Answer
13
22. What are
configuration and security keys? What are user groups?*.aug file?
If a configuration
key is disabled, the related objects will not show up in menus, forms or
reports and no one
will have access to those related objects. Configuration keys are
defined in a tree
hierarchy where the top configuration key is related to a license code.
The form
SysConfiguration shows the hierarchy of configuration keys. Only
configuration keys
where the related license code has been entered can be enabled and
the top level
configuration key can only be disabled by removing the license code. If you
have all license
codes entered not all configuration keys are enabled by default. Some
configuration keys
are, by default, disabled. This goes for advanced features and country
specific features.
Where configuration
keys are setting access for all users, security keys will set access
for a group of users
or per user.
Security
keys must be added to all tables, maps views and menu items.
Record Level
Security:
Administration >
Setup > Security > Record level security.
Allow members of a
Sales user group to see only the accounts they manage.
User Groups: Security
can be defined at user group level.
User group can
contain 1 or more users.
Security
permissions can be exported to *.aug file and can be imported as well.
23. Cross company
support AX 2009?
Cross company support
in forms, reports, queries and X++. You can display records
from different
companies in a single form (or report).
24. How to move
customization from development to production environment? take
application backup?
Copy following files
from dev to prod to move the customization
*.aod file stores
customization e.g axVar.aod, axCus.aod
, *.ald stores
label,*.alc stores label comments.
25. How to move
company data from dev to prod?
Export company data
in dev environment creates *.dat file which can be imported to prod
environment.
26. What if we pass
null parameter to super? E.g super (0)? What is use of super?
Super will not
execute.
Description
27. What Is RunBase
framework?
Below are the classes
used for RunBase framework.
RunBase : Is used for
tasks which should not be batch able.
RunBaseBatch : Is
used to give the application user the option to schedule a batch job for
the task.
RunBaseReport : Only
used for heavy reports and is therefore a subclass of
RunBaseBatch.
Question
and Answer
14
The runbase framework
has two primary functions. To create a similar layout for dialogs
presented to the
application users and to make it possible to schedule a process
to be batch able. The
classes prefixed with RunBase* are referred to as the runbase
framework.
28. What are foundation
classes?
Structs, structures
of named fields,
Arrays, arrays of any
type, not just simple type
Lists, lists allowing
traversal with enumerators
Maps, dictionaries
allowing lookup of values, yielding a result value
Sets, ordered groups
where duplicates cannot occur.
Struct
These are name /
value pairs that can be built and queried at runtime. They can be very
useful for a number
of situations where a class might otherwise be used. The example
below creates a
struct with two fields, adds a values and retrieves them:
{
struct s = new
struct('int age; str name');
s.Value('age', 12);
s.Value('name', 'John
Doe');
print strFmt('%1 : %2
years of age', s.Value('name'), s.Value('age'));
pause;
}
Array
Arrays are (as the
name implies) arrays of elements that are accessed by index. They
grow as required,
leaving default values of the given type for hitherto unused elements.
They're very useful
because they can contain reference types (i.e. object instances and
tables), which normal
X++ arrays cannot. They can also easily be passed as parameters
and be returned as
return values from methods, something that also eludes the normal
X++ arrays.
{
array a = new
array(Types::integer); // Array of ints
int i;
for (i = 1; i <
100; i++)
{
a.Value(i, 2*i);
}
Question
and Answer
15
print
CalculateSum(a); // Pass as parameter
}
List
Lists are simply a
sequence of objects. List elements can be inserted at the start or at the
end of the list.
There is no ordering of the elements other than the order in which they
were inserted.
{
list names = new
list(types::string);// List of strings
names.AddStart("Jones");
names.AddStart("Smith");
names.AddEnd("Sellers");
}
Sets
Sets are used to
contain elements in such a way that there is only a single element of a
given value at a
given time. It is also guaranteed that traversal of the set using
enumerators and
iterators will return the elements in order, smaller before larger.
{
set uniqueInts = new
set(types::integer);
SetEnumerator se;
uniqueInts.Add(11);
uniqueInts.Add(5);
uniqueInts.Add(45);
uniqueInts.Add(11);
// Already there.
se =
uniqueInts.GetEnumerator();
while (se.moveNext())
{
print se.current();
}
pause;
}
Maps
Maps are structures
that map one value onto another. People using the .NET framework
will know these as
SortedDictionary<TDomain, TRange>. As for sets, they can be
traversed with
enumerators and will always return smaller values before larger ones.
Operations are
available to look a value in the range set given a domain value, and to
check whether any
given value exists in the domain.
{
Map intToString = new
Map(types::integer, types::string);
Question
and Answer
16
intToString.insert(1,
"One");
intToString.insert(2,
"Two");
if
(intToString.exists(1))
{
print
intToString.Lookup(1);
}
pause;
}
I have deliberatly
not gone into enumerators and iterators, because they are not the issue
in this blog. You can
find more information about the container classes and how they can
be used in
http://msdn.microsoft.com/en-us/library/ms941640.aspx.
Now, the question
that I need your help on is this: The AFC classes as mentioned above
accept NULL values to
be inserted into them. For instance, if you are maintaining a set of
query objects, then
it is perfectly legal to insert NULL into such a set:
{
Set qs = new
Set(Types::Class);
Query q = null;
qs.Add(new Query());
qs.Add(new Query());
qs.Add(q); //
Perfectly legal.
print qs.elements();
// == 3
pause;
}
29. What are
methods to get Lookup?
SysTableLookup
class is used to get customized lookup
Lookup by EDT
relation
Lookup by Table
relation
Lookup by lookup form
30. What is view?
To make extraction of
data easier, views can be used. A view is the result of an inner join
of two or more
tables. Views are read only and support aggregated functions on the
fetched data. You can
use views as an alternative to data sources in a report.
However providing
data for OLAP cubes is the main purpose with views. Views are
synchronized to the
database. This makes views useful if you need to read data from an
Axapta table using
external tools as you can fetch data directly from the database instead
of using the COM
interface.
Question
and Answer
17
31. What data types
are not allowed on indexes?
Container, memo
32. What is
composite query?
A composite query
uses another query as its data source. A composite query is similar to
class inheritance in
X++ or C#.
A composite query is
a good design choice when one of the following is true:
An existing query
lacks only a range that you want to add.
An existing query
lacks only a method override that you want to add.
33. What is difference
between AOT query and X++ query?
AOT Query
Queries stored in the
AOT can be used in any part of your code. An AOT query cannot
be declared like a
type or a table. You will have to use a system classes to execute your
query. Still it makes
an AOT query very flexible as only a few code lines is required to
integrate your query
in any part of code. If you later on decide to change your AOT query
like
changing the way data is filtered, you changes will reflect all places the
query is
used.
The disadvantage is that it can be unclear which query to use. If
you find a query in
the AOT fitting your
needs you will not now where the query is used, unless using the
cross reference
system. Making changes to such a query could have fatal consequences.
So you will probably
ending up creating your own query in the AOT.
X++ Query
Query can both be
built and executed from X++ using the system classes prefixed with
Query*. Typically
simple queries or queries only to be use for a specific purpose are built
using X++.
Classes used for X++
query: SysQuery,SysQueryRun,QueryBuildDataSource
34. What is use of
temporary table / *setTmpData() method use ?
Temporary tables are
used for non-persistent storage in Microsoft Axapta. They are
useful in two common
situations
1. As the datasource
for a form or report, where the original data is too complex to
be easily queried.
2. As temporary
storage during complicated processing, to hold the results midway
through the process.
In general, each
instance of a temporary table, and it's associated data, will only exist
while the buffer
variable used to access it is in scope. You can point multiple buffer
variables to the same
instance of a temporary table by using either the .setTmpData()
method or by directly
assigning the buffers to each other, identically to normal tables. In
this way, even if
your original buffer variable goes out of scope, your data will be
retained while one of
the other referencing variables remains.
Question
and Answer
18
35. What is Static modifier
/ static method with e.g.?
By default methods
are created as instance methods. This means that you must declare a
class object before
being able to access the method. If the keyword static is added to
method you can access
the method without declaring the class object.
Example : find method
36. What are access
modifiers?
Public
Default behavior for
classes and methods. A public class can be inherited and class
methods can be
overridden in subclasses and called outside the class.
Protected
Only methods can be
protected. A protected method can override in subclasses, but can
only be used inside
the class hierarchy.
Private
Both classes and
methods can be set as private. However this will only affects methods.
A private method can
only be used within the current class.
37. What are
default nodes in AX class ?
An application class
has 3 default nodes: ClassDeclaration, new and finalize.
Default application
class nodes. In ClassDeclaration global variables for the class is
defined. Variables
can only be declared in ClassDeclaration, you cannot initialize
variables. Only
variables declared locally in methods can be initialized at the same time.
Macros to be global
for the class are also declared in ClassDeclaration.
38. What is use of
new() and finalize() method of Class?
Invoking new() will
call the constructor for the class. A constructor is used to initialize a
class. Several
programming languages have a method by the same name of the class.
This method is
referred to as the constructor. This practice is not used in MorphX as
new() is used as the
constructor.
The method finalize()
is used to remove the class from memory. After finalize() is called
you will not be able
to reference the class object. This is not a method which is called
automatically as the
garbage collector will automatically remove objects not used
anymore from memory.
It is not common practice to call finalize() each time an object
is not used anymore.
Even though you have a loop initiating the same class for each loop,
you would not have to
call finalize() as the garbage collector is set to run when a specific
number of objects are
no longer used.
It will make sense
using finalize() if you object is not intended to be used any more, and
to prevent other
objects using your class object.
Question
and Answer
19
39. What is final
Class?
Setting a class to
final will prevent the class to be overridden. The reason could be that
you would either
force the use of the class as it is. The class might be intended to be
used by another class
or the class may be used to provide data to another class. The final
class InventOnhand is
an example of this.
A final method cannot
be overridden by a subclass. Only instance methods can be
qualified as final,
as a static method cannot be overridden. Defining a method as final
will only prevent
inheriting. The method will have the same access level as a public
method.
40. What is
Abstract Class?
An abstract class or
method is the exact opposite of a final. The use of abstract classes is
a way of planning
inheritance as it forces creating a subclass for using the class, as an
abstract class cannot
be declared. This is often used in the standard package for super
classes to control
that the super class is not declared by mistake. The class
SalesFormLetter which
is used for creating documents such as sales confirmations and
sales invoices uses
this practice. The class has an construct() method which should be
used, and to prevent
the class being declared using new() SalesFormLetter is qualified as
abstract.
Methods can be
declared as abstract, but only if the class is abstract. An abstract method
must be overridden as
an abstract method cannot have a code block. Abstract methods
contains only a
parameter profile. You can however use the macro call #if.never to add
"code" to
an abstract method. This will help clarify why this method must be overridden
in the subclass. You
might wonder why you should not simply add comments in the
abstract method. The
point is that code within the macro call is shown in color as with
any other code in the
editor making it easier to differentiate comments and code. Note
that no validation is
done on code written in the #if.never macro so anything could be
written. It is
optional to qualify methods of an abstract class as abstract. For this reason
you will still be
able to add variables in the ClassDeclaration of an abstract class.
The access modifiers
protected can be use with abstract methods. An abstract method
cannot be static, as
the static methods only exist in the super class.
41. What is
Interface Class?
MorphX can only
handle single inheritance, meaning that only one super class is allowed.
This is not bad at
all, as in languages supporting multi inheritance it can be tricky getting
an overview of the
class hierarchy.
Another option exists
as you can create interface classes and implement the interface
classes in your sub
class. Like abstract classes and methods an interface class cannot be
declared and the
methods of an interface class cannot contain code. So what is the
difference between an
abstract class and an interface? Well an abstract class is used to
give instructions on
the content of a subclass. An interface does not have to be part of the
hierarchy. You can
implement more than one interface for a class. Interfaces are used for
common tasks like the
interface SysPackable which is controlling that the methods for
storing the last
values of a dialog are created.
Question
and Answer
20
interface
MyClass_Interface
{
}
An interface is in
fact not a real class. When creating an interface you are replacing the
class keyword with
interface. Interfaces can be inherited by another interface, but a class
cannot inherit an
interface, a class implements an interface.
public abstract class
Runbase extends Object implements sysSaveable, sysRunable
{
}
42. Difference
between 2 tier and 3 tier?
An Axapta
installation can be configured to run as a 2-tier or 3-tier installation. Where
a
2-tier installation
consists of a client and a server, a 3-tier installation also has an
Application Object
Server, also called AOS. Without an AOS server the workload is on
the client instead
which will result in more calls between the database server and the
client. An AOS will
reduce the traffic between database and client as the AOS will
communicate with the
database instead, making it possible only to have calls to client
when communicating
with the user interface.
43. What is use of
args() ?
Args have been used
as a parameter variable.
A run able class must
have Args as parameter in the main() method. The purpose of Args
is to transfer
parameters between objects. If you are calling a run able class from a form
you can use Args to
pass a formRun object making it possible to query data in the form,
or even execute
methods in the calling form.
44. What is use of
dialog class?
A dialog is the user
interface of a class. When you need a dialog for your class you
should use the
runbase framework as dialogs is an integrated part of the framework. The
classes prefixed with
Dialog* are used by the framework. Simple form features like
grouping fields,
adding lookups to related fields are provided by the dialog classes. You
can add additional
buttons to your dialog like calling a query. If your class is inherited
from the
RunBaseReport class your report query and printer settings will automatically
be wrapped in the
dialog.
45. CustAccount
field added by dialog, If user enters wrong customer account and click
ok button of dialog
, will system throws error that custAccount does not found in relating
table on dialog ?
No, system will not
throw error. To handle such errors we need to override the validate or
validate_<control
name> method on dialog.
46. What is use of
Global class?
All methods in the
Global class are static methods. You can create instance methods in
the Global class.
However using an instance method would require declaring the class.
Question
and Answer
21
The idea with Global
is to have a collection of function create in X++ which can be
referenced without
specifying the class name. Methods in global are referred in the same
way as a system
function.
Several of the
methods are a supplement to the functions used for base type operations
like the Global
method date2StrUsr() which convert a variable of the type date to a string
formatted by the user
default date settings.
47. What is use of
label file?
The label system is
one of the powerful features of Axapta making the application
handling of multi
languages easy. Instead of entering the text for a field or a help text
directly in the code,
a label id is added. The label id is drawn from the label system which
holds information of
the corresponding text for label in each language.
The label id has the
systax: @<label file id><label number>, like @SYS1002. The label
file id is a three
character id. Label number is a forth running number, increased when a
label is added. In
the Axapta application folder, a set of labels files exist for each label
file id. The labels
files are named AX<label file id><language id>.<extension>
like
AXSYSEN-US.ALD. For
an overview of the label files, see figure 51: Label files.
File extension
Description
*.ALD
A text file
containing all labels for the label file id.
*.ALC
Comments added in the
label system are stored in this file.
*.ALI
Index file for the
label file id. If this file is missing, the file will automatically be created
first time the label
system is accessed.
48. What is
difference between pass by reference and pass by value?
Pass by reference:
Declare varible and
set it :
SalesLine salesLine =
salesLine4
Down-side is if
salesLine4 changes - so does salesLine
Pass by value:
SalesLine salesLine;
salesLine.data(salesLine4);
49. What is
difference between method and Macro?
Macros can be created
under the Macro node in the AOT, as a local macro in a method
or a single line
defining a constant. The main difference between a macro and a method
is that a macro has
no variable declaration part, and the code in a macro is not validated
for errors before
executed from a method. This is one of the main reasons not to put
code in macros, as it
makes the code more difficult to read.
When using macros in
your code, the macros must be declared after the variable
declaration. The
common place to put the definition is in the ClassDeclaration of a class,
form or a report.
This will make the macro definition available for all parts of the object.
Question
and Answer
22
50. What is
polymorphism?
Poly means “Many” and
morph means “Forms” .Many forms of one object is called
polymorphism.
Polymorphism is a
core concept in OOP and goes hand in hand with inheritance. You can
use an object from
type of a subclass always like an object from type of a superclass. By
example if you create
a class that extends RunBaseBatch you can use it always like a
RunBaseBatch Object.
class MyBatch extends
RunBaseBatch
{
...
}
RunBaseBatch batch = new
MyBatch();
batch.run();
51. What is use of
super?
super() method is usually used to
override system method of base
object.
For example - validateWrite()
method on table.
.....................
boolean ret;
;
ret = super();
//Some condition below
if (<condition 1> ==
<condition 2>)
ret = true;
else
ret = false;
return ret;
----------------------
In above method, first line (ret
= super()) will call standard system
validation. Subsequently that is
overridden by calling some
validation.
52. What are
mandatory components in base and EP ax installation?
Base Installation:
AOS, DataBase Server, ApplicationServer
EP Installation:
Above 3 + Role Centers and EP + Business Connector
53. What if you
install SharePoint and EP site on same port e.g. 80?
At a time only one
site will work as both site with same post cannot run at same time.
54. AX EP
Architecture? How business connector communicates? What is use of
business connector?
Explain flow diagram
step by step
Question
and Answer
23
55. Types of
communication Adapters AX? What is AIF? What are integration methods
in AIF? What is use
of endpoint?
Application
Integration Framework (AIF) provides an extensible framework that supports
multiple asynchronous
transports, as well as synchronous transport using Web services,
to exchange documents
in XML format with external systems.
An exchange starts
with a service based on a document, that is, a document class defined
using Microsoft Dynamics
AX business logic. The document is serialized into XML and
header information is
added to create a message, which may then be transferred into or
out of the Microsoft
Dynamics AX system.
Your Microsoft
Dynamics AX system is called the local endpoint within AIF. The other
entity taking part in
an exchange is called the endpoint. Endpoints and all the other
elements of an
exchange are set up and configured using forms found when you click
Basic > Setup >
Application Integration Framework.
There are two methods
for exchanging data in AIF:
Web services - A
data exchange in which a Microsoft Dynamics AX service is consumed
an external system.
Adapters - A
data exchange in which Microsoft Dynamics AX adapters are used to
communicate with the
external system. Microsoft Dynamics AX adapters support the
following transport
mechanisms:
File
system
Message
Queuing (MSMQ)
BizTalk
Server
Web services-based
exchanges
Question
and Answer
24
Using Web services
for data exchange requires the installation and configuration of Web
services for
application integration and Microsoft Internet Information Services (IIS) 7.0.
Exchanges configured
to use Web services are processed synchronously and do not use
the Microsoft
Dynamics AX queues. AIF allows multiple connections; that is, your
Microsoft Dynamics AX
system can support the processing of document exchanges with
multiple partners
simultaneously.
To help ensure the
highest level of security, deploy Web services on your intranet only.
Deployment of Web
services outside your intranet requires additional middleware known
as a trusted
intermediary to ensure security. For more information about AIF security, see
Security
considerations for AIF and Security considerations for AIF Web services.
For more information
about data exchanges using Web services, see Web services-based
exchanges in AIF and
Configure document exchanges with Web services in AIF.
Adapter-based
exchanges
An adapter-based
exchange uses an adapter to convert the document into the proper
format for exchange
by means of a particular transport mechanism, such as Message
Queuing (MSMQ).
Adapter-based exchanges are asynchronous because they involve
moving the document
into a queue where it waits for processing by a Microsoft
Dynamics AX batch
job. Adapter-based exchanges require configuration of an adapter
and a channel for use
by AIF.
For asynchronous,
adapter-based exchanges, you configure and control the Microsoft
Dynamics AX batch
jobs that process documents in the AIF queues.
Microsoft Dynamics AX
includes the functionality to enable connections with the
following
asynchronous adapters:
File system
Message Queuing
(MSMQ)
BizTalk Server
Note
Although
adapter-based exchanges are asynchronous, if you use the BizTalk adapter, it is
possible to configure
the data exchange to be synchronous or asynchronous.
Send and receive
documents and data
Regardless of which
transport method you use, AIF can be used to either send data into
Microsoft Dynamics AX
(inbound) or retrieve it (outbound). An example of an inbound
exchange would be an
external system sending a sales order to be saved to the Microsoft
Dynamics AX database.
An example of an outbound exchange would be an external
system sending a
request for a purchase order and receiving the purchase order back. The
inbound and outbound
exchanges can be categorized as follows:
Send
data - Microsoft Dynamics AX sends documents to an external system.
Send
data in response to requests - Microsoft Dynamics AX
receives requests for
documents from
another authorized system, retrieves the requested information (a
document or a list of
documents) from the Microsoft Dynamics AX database, and returns
it to the requesting
system, with appropriate filtering and security. The request message
would contain the
entity keys or a query that specifies the data that the external system is
requesting.
Question
and Answer
25
Receive
and create data - Microsoft Dynamics AX receives documents from another
authorized system and
creates new records in the Microsoft Dynamics AX database.
By using outbound
exchanges in AIF, you can send documents and data to your trading
partners. You receive
documents and data from endpoints in an inbound exchange.
Send documents and
data
Sending a document
can be initiated by clicking a button on a form, such as the Send
electronically button
on the Chart of accounts form.
Receive documents and
data
When documents are
received in an inbound transfer, data is added, updated, deleted or
changed in the
Microsoft Dynamics AX database. For this reason, you should carefully
consider how to
ensure the security of your Microsoft Dynamics AX system when
configuring the
Microsoft Dynamics AX users associated with an endpoint. Be sure that
endpoint users are trusted
by your business organization.
56. What is
workflow?
"A workflow is a
depiction of a sequence of operations, declared as work of a person, a
group of persons, an
organization of staff, or one or more simple or complex
mechanisms"
Dynamics AX 2009
ships with an integrated workflow engine. As stated above, a
workflow is a
sequence of operations that defines how a "business document" is
handled.
In Dynamics AX 2009
there are two differnt types of operations: A task and an approval.
Where a task can be
anything that requires interaction with the workflow. An approval
also requires an
interaction, but has four pre-defined outcomes: Approval, Deny, Reject
and Request Change.
Handling Workflows
The workflow
component is shipped on the Dynamics AX 2009 DVD and has to be
installed seperatly.
It requires an IIS 6 or higher and the .NET business connector to
communicate with
Dynamics AX. Befor installing it is recommended that the AOS is not
running with network
service account, but has an own AD user.
Dynamics AX already
contains some approval workflows. The predefined workflows can
be enabled and
configured using the workflow configuration form at the corresponding
module. For example
"General Leger" > "Setup" > "Workflow
configuration". A
workflow
configuration in Dynamics AX is versioned. When a configuration is changed,
the version number is
increased. The workflow configuration can be used to define:
· messages
for the interacting user
· conditions
for the workflow
· assignment,
either role-based or user-based
· timeout
and escalation
Question
and Answer
26
· messages
on events
· sub-workflows
Workflows are full
traceable. Each workflow instance can be inspected at "Basic" >
"Inquiries"
> "Workflow history". Workflow instances can be filtered by state
like
finished, comleted,
canceled. The overview grid shows the main instance information,
like name, started
and finished date and user. The tabpages below show details for each
instance. The
screenshot shows the sequence of tasks and for each operation when it was
started, whom it was
assigned and the taken action. Item 0005 was approved by Charlie
Carson from
purchasing department at 21.6 21:40
57. What classes
used for ledger posting?
There are two ways to
be considered when posting transactions:
1. Use the
LedgerVoucher class and sub-classes API.
2. Use a journal
Classes.
1. Use the
LedgerVoucher class and sub-classes API.
The Classes are:
Question
and Answer
27
• LedgerVoucher -
Posting {LedgerVoucher harnesses the posting of multiple vouchers at
a time. }
• LedgerVoucherObject
- Voucher {The LedgerVoucher class holds all the vouchers in
temporary storage.}
•
LedgerVoucherTransObject – Transactions {Holds transactions in each Voucher}
2. Use a journal
Classes.
The tables used are
LedgerJournalName, LedgerJournalTable, and LedgerJournalTrans.
The steps are:
• Create a journal
table record {Table\LedgerJournalTable}
• Create lines for
each transaction to be posted {Table\LedgerJournalTrans}.
• Post the journal.
{Classes\LedgerJournalCheckPost}
58. What are
technical differences between AX 4.0/2009?
Explain new AX 2009
Features
Layer differences,
Supports cross company, composite query, Date time data type, group
by and order by
clause , EP development through VS, SSRS, Electronic Signature in AX
2009 SP1,site
dimension etc
59.What class can
be used to compile x++ code written as text?
MorphX has a system class
called XppCompiler which can be used to compile X++ code
written as text.
60. What is version
control system? How it is used?
The version control
system integration allows a higher level of control of the
development
environment. All changes are stored in a central database where the history
of each element can
be inspected, and old versions rolled back if required. By default,
most version control
systems allow multiple developers working on a single object at any
given time. In
Dynamics AX in combination with Visual SourceSafe 2005 only the Lock-
Modify-Unlock pattern
is supported. Although Visual SourceSafe 2005 allows Copy-
Modify-Merge. In
essence, programming in Dynamics Ax with a version control system
requires each
developer to have his or her own development environment, with local
AOS and repository.
The version control integration in Dynamics Ax includes all AOT
elements as well as
the label files. In addition, the system will ensure that unique Ids are
used for all
elements, despite the development taking place in multiple environments.
This is achieved
using a Dynamics Team Server.
Working with Version
Control is easy. First thing you do, is to put an AOT object under
version control. To
do so use the "Create" Option in the Context Menu on the object.
Next perform the
first Check In and give some description. To modify an object use the
Context Menu again
and Check it out. By default the object is locked, and cannot be
check out by anyone
else. So remember to check it in again !
One benefit from
Version Control is to restore an older version. This can be done by
using the context
menu on an AOT Item. You can view the history of an object and who
Question
and Answer
28
has edited the
object. You can compare different object versions; And of course you can
restore a particular
version.
Be aware of side
effects! If you restore an older version, there may be other elements in
your application that
need the newer version. Use the cross references to find
dependencies.
61. What is
difference between generated and auto design of the report?
Designs can be
created either as auto design or as a generated design. A design can also
consist of both an
auto design and a generated design. In this case only the generated
design will be used.
The main differences between auto designs and generated designs
are that auto designs
take full advantage of MorphX, they allow for dynamic templates,
auto headers and auto
sums based on criteria established in the query. 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.
62. What is use of
epilog and programmable section of report?
Epilog is the last
page printed.
Programmable sections
are executed from code (element.excute(<programmable section
number>). This type
of sections can be used in cases, where you need to print data which
is not part of the
query.
63. What is use
Fetch/Init/Run/Send etc?
Fetch
This method is the
engine of the report. Fetch() opens the user dialog, selects the records
from the database by
processing the query and sending the records to be printed.
This method is
generally overridden, when an expression cannot be specified in a query.
Init
This is the first
method called. The method is initializing the report. Entities used in the
report are
typicallyinitialized here.
Run() is called when
the OK button is pressed in the dialog. Run() performs the following
steps:
If no generated
design exists, a design is created on the fly based on the auto design.
Call fetch()
Call print()
The method can be
used for adding ranges to the query after the Based On settings in the
dialog.
Send
Question
and Answer
29
Send() is related to
fetch(). Fetch() iterates through the query records, and send() sends
the records to the
design. The method can be overridden to validate whether or not the
record should be
printed.
ExecuteSection
Each section in the
design has the executeSection method, which is used to print the
section. The method
can be used to validate whether or not the section must be printed.
Pack
This method is used
for storing last values. It is used in conjunction with
unpack(), which loads
the last value stored. However unpack () is not a base method. If a
new dialog field has
been added, pack() is overridden to store the values from the dialog.
64. What is order
for report execution methods?
The following methods
are executed in listed order when a report is loaded as shown
here:
init() _ dialog() _
run() _ fetch() _ send() _ print()
1. Init() and
dialog() are triggered when the report is loaded.
2. Run() is triggered
when the OK button is pressed in the dialog.
3. Fetch() is looping
through the query and for each record found send() is
triggered.
4. Finally, print()
is triggered.
65. What are main
classes used for SO and PO posting?
SO posting:
SalesFormLetter
PO posting:
PurchFormLetter
And explain _invoice
class used in posting by constructing above classes.
66. What are major
tables affected after SO/PO invoice posting?
Along with
sales/purchTable and sales/purchLine , Cust/VendInvoiceJour and Line ,
InventTrans,TaxTrans
and _IN(if ind localization),MarkUpTrans,LedgerTrans
67. How to cancel
SO/PO quantity?
Go to lines –
Inventory- click on Delivery Remainder – Dialog will open – enter quantity
to be cancelled –
click on cancel quantity button
68. What will be
the status in inventory transaction after SO /PO /Transfer invoicing?
After SO: Issue
status will be sold
After PO: Receipt
status will be deducted.
After Transfer: Issue
status will be sold
Question
and Answer
30
69. How to write
off /write ON (stock down/stock up) quantity from particular
warehouse? How to
take inventory opening balance ?
Stock Down /write
off:
Create Transfer
Journal and in journal lines select item and enter quantity (-ve) and post
Stock Up /write
on/Inventory Opening Balance upload :
Create Transfer
Journal and in journal lines select item and enter quantity (ve) and post
70. What are item
and storage dimensions in AX 2009? What is inventDimId?
Item Dimensions:
Configuration, Size, Color
Storage Dimensions:
Site, Warehouse, Batch Number, Location, Pallet Id, Serial Number
Combination of all
above 9 dimensions forms InventDimId which is stored in InventDim
Table
i.e.The InventDim
table contains values for inventory dimensions.
71. What
transactions in AX 2009 affects Physical and financial value of Inventory?
Transactions that
affect physical value
Purchase order
Packing Slip
Sales order Packing
Slip
Production order
Report as Finished
Production picking
list journal
Transactions that
affect financial value
Purchase order
Invoice
Sales order Invoice
Production order End
(This will move the RAF and the Picking List transactions into a
financial status)
Inventory Journal
(All inventory journals affect financial value only)
72. If On hand
stock for item is not available then what setup is required to post SO
invoice? What is
the setup to allow physical and financial –ve inventory?
Above scenario, Check
the checkbox Physical and financial –ve inventory checkboxes on
Inventory model
groups.
Question
and Answer
31
73. What is Bank
Reconciliation?
Bank Reconciliation
Statement:
A form that allows
individuals to compare their personal bank account records to the
bank's records of the
individual's account balance in order to uncover any possible
discrepancies.
Since there is timing
differences between when data is entered in the banks systems and
when data is entered
in the individual's system, there is sometimes a normal discrepancy
between account
balances. The goal of reconciliation is to determine if the discrepancy is
due to error rather
than timing.
AX Path: Bank >
Bank Account Detail> select bank>function>reconcile.
In this window there
are Print button .There are 2 report one is summary other is detail.
The Detail one show
whole information of reconciliation
74. What is use of
Posting Profiles in AX? How many types of posting profiles are
available? Where we
can setup posting profiles for Fixed Asset?
Enterprise Resource
Planning applications make financial entries easier where make the
transaction in the
sub-module and voucher entry created and posted automatically. The
integration points in
MS Dynamics AX 2009 called Posting Profiles where
identify which ledger
account will be hitting after posting transaction.
In AX, Sales,
Purchase and Fixed asset posting profiles we can be setup.
Open the Posting
profiles form for Fixed assets go to: General ledger > Setup > Fixed
assets > Posting
profiles Use this form to specify the ledger accounts to which fixed asset
transactions are posted.
*********************************************************************************
Mostly asked Interview Questions For Axpta Technical Consultant
*********************************************************************************
******************************************************************************************************************
******************************************************************************************************************
*******************************************************************************************************************
How to show current Date in AX 2009
info(date2str(systemdateget(),123,2,1,2,1,4));
*******************************************************************************************************************
IMPORTANT CONCEPTS
1. Report Data Provider (RDP) Class
2. Data Contract Class
3. Table
List page interaction class and methods
What is the Difference between Overriding and overloading?
Difference between "Element and This" keyword in AX
Difference between formDataSource.query() and formDataSource.queryRun().query()
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.
Dynamics Ax 2009 Layers
How we can use multiple datasets in a tablix?
Debug::assert
2. Difference between edit and display method?
3. Difference between perspectives and table collection
Perspectives can organize information for a report model in the ApplicationObject Tree (AOT).A perspective is a collection of tables. You use a report model to create reports.Table collection is a collection of table, which sharing across all the virtual companies.
4.What are the 4 types of files we need to copy to the standard folder?
*.aod, *.ahd, *.ald, *.add, *.khd
5. Why we use virtual companies?
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.
6. How can we restrict a class to be further extended?
using Final Keyword for ex: public final class <ClassName>
7.Which are classes are used for data import export?
SysDataImport and SysDataExport
8. From which table u can get the user permissions stored in Ax?
AccessRightList table.
9.What should we do if we need last record to be active when a form is opened?
In properties of datasource table set the StartPosition property as last.
10. What is the sequence of events while a report is generated?
Init, Run, Prompt, Fetch, Print
11. Name few X++ classes/Coreclasses related to Queries?
Query, QueryRun, QueryBuildRange, QueryBuildDataSource, QueryBuildLink
12. What is an index?
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
*********************************************************************************
Mostly asked Interview Questions For Axpta Technical Consultant
*********************************************************************************
Classes, Tables, Forms and Methods used to post the sales orders
SalesTableType and SaleslineType classes will get called while creating the orders.
SalesFormLetter* classes will be used to post the sales order at various document status(packing,invoice etc.
SalesParm* tables are used to prepare the data for posting
----------------------------------------------------------------------------------------------------------------------
Tables Name :-
CustConfirmJour, CustConfirmTrans - when a sales order gets confirmed
CustPackingSlipJour, CustPackingSlipTrans - when a packing slip is posted.
CustInvoiceTable,CustInvoiceTrans - when an invoice is posted.
These are some of the mainly used tables.
******************************************************************************************************************
Difference between perspectives and table collection :- Perspectives can organize information for a report model in the Application Object Tree (AOT).A perspective is a collection of tables. You use a report model to create reports.Table collection is a collection of table, which sharing across all the virtual companies.
******************************************************************************************************************
From which table u can get the user permissions stored in Ax :- AccessRightList table.
******************************************************************************************************************
Difference b/w Abstract class and Interfaces
An abstract class may contain complete or incomplete methods. Interfaces can contain only the signature of a method but no body. Thus an abstract class can implement methods but an interface cannot implement methods.
An abstract class can contain fields, constructors, or destructors and implement properties. An interface cannot contain fields, constructors, or destructors and it has only the property's signature but no implementation.
An abstract class cannot support multiple inheritance, but an interface can support multiple inheritance. Thus a class may inherit several interfaces but only one abstract class.
A class implementing an interface has to implement all the methods of the interface, but the same is not required in the case of an abstract Class. Various access modifiers such as abstract, protected, internal, public, virtual, etc. are useful in abstract Classes but not in interfaces. Abstract classes are faster than interfaces.
******************************************************************************************************************
AX 2012 purchase order posting class
confirmation- purchpurchorderjouranlcreate
reciptlist- purchreciptlistjournalpost
packingslip- purchpackingslipjournalpost
invoice- purchinvoicejournalpost
*******************************************************************************************************************
How to show current Date in AX 2009
info(date2str(systemdateget(),123,2,1,2,1,4));
*******************************************************************************************************************
AX2012 Create SSRS Report using Data Provides Classes
RDP implements the standard MVC(Model View Controller) design pattern.
· Model-view-controller (MVC) is a pattern used to isolate business logic from the user interface.
· Model: Responsible for retrieving data and for business logic, this can included queries, data methods, or other classes that are designed to retrieve data.
· View: Responsible for the User Interface, this can also be thought of as the design for the report.
· Controller: Orchestrates the flow between Model and View
* Create the Contract Class first,
This class is used to create parm methods for the reports, So if you have any parameters that you want to pass to report then create parm methods for those as data members.
This class is used to create parm methods for the reports, So if you have any parameters that you want to pass to report then create parm methods for those as data members.
* Create Controller class which extends SrsReportRunController
* SrsReportRunController : Through this class we just create the Main method where you have to define the reportname and design and this was the method which will calls the report to execute. Starting point of the report.
* prePromptModifyContract :- If you want to pass the values for the report before prompting to user for input you can override this method
* Create DataProvider class which extends SrsReportDataProviderPreProcess.
* override the method ProcessReport where you will write the business logic to fill into thetmp table
* Override the postbuild function to bind the lookups for the fields.
**********************************************************************************************
Report data provider class – processes business logic based on parameters and a query, and then returns the tables as a dataset for the report.
***********************************************************************
SRSReportQueryAttribute attribute to specify the query to use to get the data for the report.
***********************************************************************
SRSReportParameterAttribute attribute to specify the data contract class that defines the report parameters for the report.
*****************************************************************************************************************
User Interface (UI) Builder Class is used to define the layout of the parameter dialog box that opens before a report is run in Microsoft Dynamics AX. It is used to add the customization as well as additional fields in the dialog.
Following are the scenarios where UI Builder Class can be used:
1. Grouping dialog fields
2. Overriding dialog field events
3. Adding a customized lookup to a dialog field
4. Binding dialog fields with Report contract parameters
5. Changing the layout of the dialog
6. Adding custom controls to the dialog
To create a UI builder class, extend it with SrsReportDataContractUIBuilder.
SysOperationContractProcessingAttribute(classStr(SSRSDemoUIBuilder))
· it will link the UI Builder Class with the contract class.
***************************************************************
RDP Class Reports
IMPORTANT CONCEPTS
1. Report Data Provider (RDP) Class
Report Data Provider Class is an X++ class that is used to access and process data for a SSRS report. The RDP class processes the business logic based on a specified parameter and/or query and returns a dataset to the reporting services. In order to create a RDP class in AX, you have to extend that class withSRSReportDataProviderBase. This tells AX that this class will be used by reporting services to process the data.
Two important attributes are used in RDP classes:
1. SRSReportQueryAttribute: specifies which AOT query will be used in this report. If the RDP class uses an AOT query to process data, define this attribute at the beginning of the class.
2. SRSReportParameterAttribute: defines the data contract class that will be used by this report to prompt for parameter values. If the RDP class contains any parameters this define this attribute at the beginning of the class.
Both the attributes are optional. If the report does not use any query or does not want any parameter to filter report data, these attributes do not need to be used.
2. Data Contract Class
A data contract class is an X++ class which contains parm methods with the DataMemberAttribute defined at the beginning of the method. This class is used to define one or more parameters that will be used in a SSRS report.
3. Table
An AX table is used as the dataset to store data for the report. The RDP class processes the data and stores it in the table which is then used by a SSRS report to render data.
A table can be a temporary table (InMemory or TempDB) or a regular table, but it is Microsoft best practice to use a temporary table.
The type of temporary table is based upon the performance considerations. InMemory temporary table is used when the data set is small, while TempDB is normally used for larger datasets to improve performance.
*********************************************************************************************
List page interaction class and methods
Interaction class of list pages extends SysListPageInteractionBase class. Some handful methods of this class are as follows:
. initializing: Called when the form is initializing – Similar to the form init method
. intializeQuery: Also called when the form is initializing – Similar to the datasource init method
. selectionChanged: Called when the active record changes – Similar to the datasource active method.
. setButtonEnabled: Should be overridden to dynamically enable/disable buttons based on the current selection. This is called from the selectionChanged method.
. setButtonVisibility: Should be overridden to show/hide buttons when the form first opens. This is used more to do a one-off layout adjustment based on system configuration/parameters, as well as the menu-item used to open the form.
*********************************************************************************************
What is the Difference between Overriding and overloading?
Overloading is defining functions that have similar signatures, yet have different parameters.
Overriding is only pertinent to derived classes, where the parent class has defined a method and the derived class wishes to override that function.
Overriding
|
Overloading
|
Methods name and signatures must be same.
|
Having same method name with different
Signatures. |
Overriding is the concept of runtime polymorphism
|
Overloading is the concept of compile time polymorphism
|
When a function of base class is re-defined in the derived class called as Overriding
|
Two functions having same name and return type, but with different type and/or number of arguments is called as Overloading
|
It needs inheritance.
|
It doesn't need inheritance.
|
Method should have same data type.
|
Method can have different data types
|
Method should be public.
|
Method can be different access specifies
|
*********************************************************************************************
Difference between "Element and This" keyword in AX
Element and This points to the same object in some cases and different in other cases.
In a form method element and this are same and will point to fromRun object, but in the formDataSource method element still points to the formRun object and this points to the formDataSource object. You cannot use element to refer table or class object.
************************************************************************************************************
Difference between formDataSource.query() and formDataSource.queryRun().query()
Any 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 informDataSource.queryRun().query()).
When the research method is called, a new instance of the queryRun is created, using theformDataSource.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.
************************************************************************************************************
Dynamics Ax 2009 Layers
Dynamics AX 2009 consists of sixteen application object layers that contain all the
elements you see in the AOT.
These layers can be looked at as an onion with multiple layers. In the middle is the
core application in the SYS layer and the outermost layer is the user layer USR.
Therefore, when any application element is being executed the system will look at
the outermost code layer first to see if there is any code for that element; if not, it peels a layer off the onion, and tries the next layer. When it hits a layer where the element exists, it will use the code from this layer, and will not continue to peel off layers to find code for that element in the innermost layers.
Layers with their description
SYS The standard application is implemented at the lowest level,
the SYS layer.The application objects in the standard
application can never be deleted.
GLS Country/region specific changes will be developed in GLS
Layer.For e.g as you all know that Tax structure differs
from country to country.So such localization functionality
can be developed in GLS layer.
HFX HFX is an application object patch layer reserved by
Microsoft for future patching or other updates.
SL1, SL2,or SL3 A layer where the distributor can implement
vertical partner solutions.
BUS When a business partner creates their own generic solution,
their modifications are saved in the BUS layer and the top-
level application objects are used.
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.
Such modifications are saved in the VAR layer.
CUS The supervisor or administrator of an end user installation
might want to make modifications that are generic to the
company. Such modifications are saved in the CUS (CUStomer)
layer.
USR End users might want to make their own modifications, such
as in their reports.These modifications are saved in the USR
layer.
elements you see in the AOT.
These layers can be looked at as an onion with multiple layers. In the middle is the
core application in the SYS layer and the outermost layer is the user layer USR.
Therefore, when any application element is being executed the system will look at
the outermost code layer first to see if there is any code for that element; if not, it peels a layer off the onion, and tries the next layer. When it hits a layer where the element exists, it will use the code from this layer, and will not continue to peel off layers to find code for that element in the innermost layers.
Layers with their description
SYS The standard application is implemented at the lowest level,
the SYS layer.The application objects in the standard
application can never be deleted.
GLS Country/region specific changes will be developed in GLS
Layer.For e.g as you all know that Tax structure differs
from country to country.So such localization functionality
can be developed in GLS layer.
HFX HFX is an application object patch layer reserved by
Microsoft for future patching or other updates.
SL1, SL2,or SL3 A layer where the distributor can implement
vertical partner solutions.
BUS When a business partner creates their own generic solution,
their modifications are saved in the BUS layer and the top-
level application objects are used.
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.
Such modifications are saved in the VAR layer.
CUS The supervisor or administrator of an end user installation
might want to make modifications that are generic to the
company. Such modifications are saved in the CUS (CUStomer)
layer.
USR End users might want to make their own modifications, such
as in their reports.These modifications are saved in the USR
layer.
************************************************************************************************
How we can use multiple datasets in a tablix?
SQL Server Reporting Services 2008 R2 has introduced a new function called “LOOKUP”. LOOKUP function is used to retrieve the value from multiple datasets based on 1 to 1 mapping. For example if we have two datasets and both the datasets have EmpID so based on the EmpID mapping, we can retrieve the data from both the datasets
ITERATORS VS. ENUMERATORS
We can traverse our collections by using either an enumerator or an iterator.But there is no clarity why sometimes iterator fails while on other occasions it is flawless.Simply what we do is that just replace iterator with the enumerator.
First theoretically what happens behind the scenes is as follows:
When collection classes were first introduced in DAX, the iterator was the only option.Butbecause of a few unwarranted drawbacks that appear as hard-to-find errors, enumerators were added, and iterators were kept for the backward compatibility.
*********************************************************************************************
Debug::assert
This method allows to check if some Boolean condition evaluates to true and if it doesn't - stop further execution and show stack trace. Debug::assert() should be used to validate some assumptions made in the code which should never happen if nothing is broken in the application. It means that wrong user input should not be asserted but rather validated by normal if statement and exception should be thrown if the input is wrong. However, if the code relies, for example, on query data source name, which can be broken only in development time - that is a good place to add assert to.
*******************************************************************************************************************
1. Difference between following:
· condel :- Use condel to delete one or more items from a container.
· confind :- Use confind to locate a sequence of items in a container.
· conins :- Use conins to insert some items into a container.
· conlen :- Use conlen to find out how many items there are in a container.
· connull :- Use connull to explicitly dispose of the contents of a container.
· conpeek :- Use conpeek to extract an item from a container, and to convert it into another data type
· conpoke :- Use conpoke to replace (poke) an item in a container.
2. Difference between edit and display method?
· Display 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
· Edit Indicates that the method's return type is to be used to provide information for a field that is used in In a form. The value in the field can be edited.
3. Difference between perspectives and table collection
Perspectives can organize information for a report model in the ApplicationObject Tree (AOT).A perspective is a collection of tables. You use a report model to create reports.Table collection is a collection of table, which sharing across all the virtual companies.
4.What are the 4 types of files we need to copy to the standard folder?
*.aod, *.ahd, *.ald, *.add, *.khd
5. Why we use virtual companies?
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.
6. How can we restrict a class to be further extended?
using Final Keyword for ex: public final class <ClassName>
7.Which are classes are used for data import export?
SysDataImport and SysDataExport
8. From which table u can get the user permissions stored in Ax?
AccessRightList table.
9.What should we do if we need last record to be active when a form is opened?
In properties of datasource table set the StartPosition property as last.
10. What is the sequence of events while a report is generated?
Init, Run, Prompt, Fetch, Print
11. Name few X++ classes/Coreclasses related to Queries?
Query, QueryRun, QueryBuildRange, QueryBuildDataSource, QueryBuildLink
12. What is an index?
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
*******************************************************************************************************************
1. X++ Maps: it can be used as a temp data store for the given scope of a process. This takes us less over head, and is much quicker than a TempTable. For Further reading
2. AOT Maps: A map can unify the access to similar columns and methods that are present in multiple tables. You associate a map field with a field in one or more tables. This enables you to use the same field name to access fields with different names in different tables. Methods on maps enable you to create or modify methods that act on the table fields that the map references.