Sunday 8 March 2015

Ax Technical Questions & Answers

1.       What is Axapta?
Ans. 1. Axapta is an extremely productive development and Run-time environment for enterprise resource planning(ERP) application development.
Axapta is an ERP system that was designed to be customized.
It is an IDE
Microsoft Dynamics AX 2009 is a customizable, multiple-language, and
Multiple - currency Enterprise Resource Planning (ERP) solution. Microsoft
Dynamics AX 2009 excels in:
• Manufacturing
• E-business
• Wholesale
• Services industries
2.       What is ERP?
Ans. ERP stands for Enterprise Resource Planning. ERP is a way to integrate the data and processes of an organization into one single system.

3.       Different b/w two-tier and three-tier?
Ans . Two tier: It has Clientà Application/Database server
                  Three Tier: ClientàAOS  à Database server

4.       What is layer?
Ans. To separate and control the updates and modifications made in the application is known as "layering."

5.       Types of layers in ax?
Ans. In 2009: SYS,GLS, HFX,(SL1,SL2 & SL3),BUS,VAR, CUS, USR

6.       What is AOT?
Ans. The Application Object Tree (AOT) is a tree view of all the application objects
within Microsoft Dynamics AX 2009

7.       What is Data Dictionary?
Ans. Data dictionary is relates with database. It have all database objects like tables, EDT’s, Views and maps.

8.       What is morphX?
Ans. Use MorphX to fulfill customization requirements,
such as adding new fields to a report or form.

9.       What is Intelli morphX?
Ans. Intellimorph is the automatic layout generation of forms, reports, and menus.

10.   Objects in form?
Ans. Methods , Data source , Design

11.   What is Table, views, maps, Forms, Classes and Reports?
Ans. Table: Collection of rows and columns with data
Views: are a form of transient tables that are populated at runtime using their definition and code

12.   Uses of Maps & views?
Ans.

13.   What are configuration and security keys?
Ans. Configuration key Is used to enable or disable different parts of the application objects. And security key is used to give access to user to the application object



14.   What is feature Key?
Ans. The feature key system can work for a single user or a user group. This feature is another tool that makes Dynamics AX a highly adaptable ERP.
Feature keys not only work on tables, forms, reports, queries, and menus, but also beyond that, i.e. on individual classes or methods.

15.   What is Field Groups?
Ans. The field group is a group of fields shown in the user interface. The fields that logically belong together can be placed in one field group while the Misc field group can be used to group fields that do not fit in any other field group.

16.   What is index?
Ans. An index in a database is essentially a quick lookup table which makes it faster to find records (rows) in your tables

17.   Types of indexes & differences?
Ans. Clustered indexes are indexes made in the table itself and not in a separate index file and hence with this type of indexes the entire table is sorted as per the indexed column. This is the primary difference between clustered and non-clustered indexes.
 In non-clustered indexes, the index is created on one or more column and then column value it referenced to record in table. So in non-clustered indexes are primarily make two operations i.e. locating key in index and then locating referenced record in table” unlike directly searching record in clustered indexes”. Due to this fact clustered indexes are a better choice than non-clustered indexes and hence it is recommended to have a clustered index if only one index is required or that the most frequently used column or primary key should be a clustered index.

18.   What is Relations & Types of Relations?
Ans. Database contains tables with related data, you can create a relationship between them.
                None, Field Fixed , Related fieldfixed
19.   What is delete actions & Types of delete actions?
Ans. The delete action should be used on every relation between two tables
Use table delete actions instead of writing code to specify whether deletes are restricted or cascaded. None, cascade, Restricted, Cascade+Restricted.
20.   What is lookup & Types of lookup?
Ans. In a table field if you want to choose values from some other table fields its called lookup.
A standard lookup form is created through relations on the database table, and on the Extended Data Type. If, however, you need to create a runtime lookup form that looks up other database fields than the ones offered by the standard lookup form, use the application class SysTableLookup and override the lookup method on the relevant form control
21.   What is Table Collection Use of Table collection?
Ans. Table collections do not contain any data. Virtual companies are built on table collections. They contain tables shared by more than one company. A table can be a part of more than one table collection.

22.   What is a License code?
Ans. In most cases, configuration keys are controlled by a License Code. When a license code is purchased, the family, the parent configuration key the license code controls, cannot be disabled.

23.   What is EDT?
Ans. Extended Data Types are your own customized data types. Based on the primitive MorphX data types, you can create your own customized data types.EDT can Reuse for another data types.

24.   What is Base Enum use of base enum?
Ans. Base enums are a list of literals.  Enums (enumerable type) are an extended data type that inherits from a base enum.

25.   What are the relations in EDT?
Ans. Normal and Related Field fixed.

26.   What is macro and uses of macro, Types of macros?
Ans. A macro is a code or text substitution that cannot run independently, but can be used anywhere you can write code in the system, for example in jobs, classes and forms.
Use: MorphX has a built-in macro-preprocessor. The purpose of macros is to make statements easy to reuse and you can declare macros wherever you can write X++ statements
Types Of Macros: All three types of macros have identical syntax and functionality
                1. A stand-alone macro is created using the macro-node of the Application Object Tree
2. A macro library is a stand-alone macro, which contains (local) macros
3. A local macro is declared within a method, or stand-alone macro

27.   What is menu item and Types of menu items?
Ans. MenuItem: 1. Menu items are a collection of items that can be activated from menus and forms. Each item runs an application object: a form, a report, a class, or a query.
 2. You must always create a menu item when you want to activate an application object from a menu or from a form
Types of MenuItem: 3
The Display node typically holds items that are displayed on the screen, typically forms
The Output node typically holds items that generate output, primarily reports
The Action node typically holds items that activate in batch, primarily queries and classes

28.   How can secure the objects by Menu items?
Ans. Through using security keys we can secure the object.

29.   What is Difference Between select Query and Query objects?
Ans. Can re use the query object.

30.   Which situation the different relations can use?
Ans. In a table field if you want to choose values from some other table fields We can use Relation. And We can restrict some record values.

31.   Different link Types?
Ans.
            Name
How the join is performed
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 allows for faster navigation in the parent data source since the records from child data sources are not updated immediately. For example, the user could be scrolling past several orders without immediately seeing the order lines for each one.
Active
The child data source is updated immediately when a new record in the parent data source is selected. Notice that continuous updates are resource-consuming.
InnerJoin
 Selects records from the main table that have matching records in the joined table – and vice versa.
In other words, you get one record for each match and records without related records are eliminated from the result.
OuterJoin
 Selects records from the main table whether or not 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 difference between Inner Join and Exist Join:
      When the join type is Exist Join, no more potentially matching records      are searched for once the first match has been found.
When the join type is Inner Join, all matching records are searched for.
NotExistJoin
Select records from the main table that do not have a match in the  joined table



32.   When we will use TTS Begin and TTS Commit,ttsabort?
Ans.  TTS Begin:To mark the beginning of a transaction, you use the ttsbegin statement. This ensures data integrity and guarantees that all updates performed until the transaction ends (by ttscommit or ttsabort) are consistent (all or none).TransactionBegin = ttsbegin ;
      TTS Commit: To mark the successful end of a transaction, you use the ttscommit statement. This ends and commits a transaction. MorphX guarantees that a committed transaction will be performed according to intentions.TransactionCommit = ttscommit ;
TTS Abort: The ttsabort command allows you to explicitly discard all changes in the current transaction. This results in the database being rolled back to the initial state: Nothing will have been changed. TransactionAbort = ttsabort ;
33.   Use of InitValue () method in Table?
Ans. Execute When: a new record is added. InitValue is automatically called from forms.
Rule: Note that the super() call does not do anything!Use the method to assign initial/default values to a new record.
34.   Difference B/W Validate Field and Validate Write?
Ans. Validate Field method is execute when we move from field to another field
                         Validate Write method is for a new or updated record is to be written
35.   Init() in form?
Ans. Execute When: the form is opened to create the runtime image of the form
Init is activated immediately after new
In the Init method  will be  typically initialize variables for specific controls.
36.   Args uses?
Ans. 1. The Args class is used to pass arguments to a class-constructor. Args can pass information such as name, caller and parameters to a new class.
      2. Forms, Reports and Queries all use the Args class as their first argument in the constructor. The preferred way to use Args is to Construct an Args object, supplying a name-string (see example), and then pass this Args object to the forms constructor or a Classfactory method.
       Ex : {
    Args a = new Args("CustTable");
    formRun fr = ClassFactory.FormRunClass(a);
    fr.init();
    fr.run();
        }
37.   Super()?
Ans. A reference to the system class that contains the required method.
When ”super” is used, the system method is automatically used.
38.   Cross reference?
Ans. To see the connection between variable names, type names and application paths
39.   Code profiler?
Ans. It measures the execution time of individual line.
40.   Difference b/w query Run and Query build data source?
Ans. query Run is used to run the Query
        Query build data source is to add the data source.
41.   Sequence of form opening?
Ans. New Form object initialized
         Init – on form
         Init- Data source
         Run- on form
         Execute Query- on Data source
         First Field- on Form
42.   Sequence of Report opening?
Ans.       Init method
                Prompt
                Run
                Fetch
                Send
                Print
43.   Recid and RecVersion?
Ans. RecId: Integers are used especially as control variables in repetitive statements or as indexes in arrays. In the Microsoft Axapta database all records have a unique Record ID (RecID), which is an integer.
        Recversion : For optimistic concurrency implementation, which is changed to random value when the record id updated. 32 bit integer , Default value is 1.
44.   DataAreaId?
Ans. Data area id is a company account identifier (DataAreaId)for grouping all data that belongs to a legal business entity.if data in a table must be saved per company.
45.   Difference b/w container and temporary tables?
Ans. One major difference between temporary tables and containers is that data in containers are stored sequentially, and thus retrieved sequentially. while a temporary table allows you to define indexes to speed up data retrieval. This means that containers provide slower data access
46.   Can we use multiple indexes?
Ans. Yes, in Non cluster index we can create multiple indexes.
47.   What is mapping?
Ans. A map is a data type that associates one (key) value with another value. Both the key and value values may be of any valid X++ type, including objects. The types of the key and the value are given in the declaration of the map. The implementation of maps is such that access to the values is very fast.



48.   Different types of query classes?
Ans: Build Classes- Query, QueryBuildDatesource, Querybuildrange, QueryBuildlink, QueryBuilddynalink. Run Class – QueryRun
49.   What is (This) in X++?
Ans. ) refers to the application object in which you are writing the methods.
50.   What is use of query and query Run?
Ans. Query is used to define a query
                Query Run is used to run the Query
51.   What is the use of pack() and unpack()?
Ans: Pack() method is to store the values entered in the dialog in a container.
Unpack() method is going to retrieve those values and show them in the dialog , the next time you open it.
52.   What are the form classes?
Ans. Form Run.
53.   What is the use of fetch() and send() methods?
Ans. Fetch is used for fetching the data from the table and send method is used to send it to report
54.   What is the use of super() in fetch?
Ans. If you are in a subclass and want to alter the functionality of a method in a super class, y     ou can create a method with the same name and parameters as in the superclass. You could create a class and subclass like this:
55.   What do u mean by report template?
Ans. Report Template: This property specifies a report template that should be used when the design is generated. If the report is saved with a generated design in the AOT, a later change does not affect the report. If the report only has an autodesign, the template is inserted at runtime.
56.   What do u mean by auto design and generated design?
Ans. Auto Design: The auto design specifies which fields to include in the report. The actual layout is decided at runtime after the user has specified the sorting and subtotals. This approach provides a flexible report where the user can control the break and sum structure of the report. The disadvantage is that the system developer cannot control the layout as it is generated at runtime.
Generated Design: The generated design specifies which fields to include and the specific layout of the report. As the break and sum structure is specified by the system developer, the end-user has less flexibility. The advantage is that the report is presented exactly as specified and implemented by the system developer.
57.   Which class is used to run the code in batch server?
Ans. Batch process in one or more database transactions. Batch processing allows you to run a job, that requires a large amount of computer power, on another, faster computer. Batch jobs, once they are activated to run, are sent to a batch list, where they are queued, and will eventually be ran.
Classes: The updates are implemented as classes which extend from the RunBase and
              RunBaseBatch classes.
58.   Record Id Generation is managed by which table?
Ans. SystemSequence Table
59.   What is COM?
60.   Ans. The Component Object Model (COM) is a general component software architecture that allows the components made by different software vendors to be combined into a variety of applications, for example Microsoft Axapta. COM defines a standard for component interoperability and is not dependent on any particular programming language.
COM provides mechanisms for:
Ø  Communication between components
Ø  Error reporting
Ø  Dynamic loading of components
61.   What is section Template?
Ans. Section templets are used to give bodies to different reports. If the same piece of section you want in many reports then you can make a section templet having those things and assign the section templet to different reports
62.   What is the use of Execute query in form data source?
Ans. It is used to Execute the Query specified
63.   How can we resize the form?
Ans. In form object FormàDesignàProperties we have to change if we have any grid in the design for the grid also we have to change width and height like below.
         Width : column width
         Height : column height
64.   Difference b/w final and finalize?
Ans. Final : It is a keyword not allow to inherit
         Finalize: To destruct the object instance.
65.   Which tool is used to up gradation 3.0 to 4.0?
Ans. MS Dynamics AXDB upgrade
66.   Use of Util Element?
Ans.
67.   Active()?
Ans. It is a formDatasource Method. the user scrolls to make a new record the current one.(ctrl+Nàwhile creating new recored when it is executed).
68.   Load Balance?
Ans. AOS instance can create many client. To each AOS client balancing
69.   What is the use of compare tool?
Ans. Enables you compare the current object with another object, or another version of the same object.
70.   Difference b/w group by and order by ?
Ans.       Group by is group the same name records.
                Order by is used for sorting in Descending and ascending.
71.   Tell me some sysClasses?
Ans. sysWizard, sysVariable, sysQueryRun, sysQuery.
72.   What is run base class?
Ans. Every time when you need to collect information and then execute a task, use the RunBase class function. This class has dialog, last value saving, query range definitions and many more useful functions inside.
73.   Global Cache?
Ans. Used to Create the Global Methods.
74.   What is dynamic link?
Ans. This dynamic link connects the other form to the current record in the first form.
          Dynamic links are automatically removed when you use another query within a query.
75.   What is the use of run() in form method?
Ans. Run() : It is a form method .The form is opened then run() method is executed, immediately after Init, to show the form.
76.    Dialog()?
Ans. The Dialog class is a special kind of form. You use it when you want to present a dialog to the user, so the user can enter some values. This will typically be used where you want to get some parameters to your program, and the dialog is not too complex. If it is complex you should design your form in the Application Object Tree, and activate it from your code.
77.   Where can global methods be created?
Ans. In global classes under the classes node in AOT.
78.   Purpose of placing classes in menu item?
Ans. Security keys test
         Passing Args to classes.
79.   What classes are used to print the sales Documents?
                Ans.  Salesformletter.
80.   What classes are used to print the purchase document such as (packing list and packing slip)?
Ans. PurchFormletter
81.Where is the result of executing select sum(balance) from cust table stored?
Ans. You can address it as custTable.Balance
82.Use map when :
Ans. Shared common methods.
83. Purpose of configuration keys?
Ans. Replace the old feature keys in the system.
84. Purpose of security keys?
Ans. To control the user access to the object
        Replace old feature keys.
85. Can difference languages to be used?
Ans. In Axapta label files are used to provide labels for interface in different languages.
86. How can we destruct an object?
Ans. Using finalize () method
86. What are the system fields?
Ans. RecId, DataAreaId and RecVersion
87. How can you post customer and vendor transaction from x++?
Ans.  CustVendvoucher.
88. for what for update?
Ans. Lock objects for updating.
89. Where the information regarding customers transitions status is stored(closed/opened)?
Ans. CustTrans, it is closed.
90. Which method of runbase interacts with user?
Ans. Prompt.
91. What Does cluster index do?
Ans. Speedup select.
92. Where the Recid is generated?
Ans. From Kernel
93. The developer wants to see the customer only if any transaction exists + all other transaction which join is used?
Ans. Outer join.
94. What the developer should do to get an access to the class variable?
Ans. Parm () method
95. What is the array length of newly created EDT?
Ans. 1.        
96. Difference b/w display () method and edit () method?
Ans. A display method returns a calculated value to be displayed on a form or a report.
        An edit method is a variant of a display method in that it returns a value to be displayed on a form and accepts user input.
97. What are main up gradation conflicts?
Ans. RecId and Label id.
98.what is the use of find() method?
Ans. Find method is used to find the record.
99. Difference b/w Bound and unbound controls?
Ans. Unbound does not have a datasourse.
100. How to invoke a macro?
Ans. #Macro.
101. How can we destruct an object?
Ans. Use finalize() method.
102.  If we want to delete the whole USR layer ,What files should be deleted?
Ans. axUSR*.* files and index(.aoi) file.
103. How is AX supporting for many users?
Ans. AOS Technology.
104. How can we balance concurrent users on server?
Ans. AOS clusterization.
105 For what “forupdate”
Ans. Lock objects for updating.
106. What file formats are used to save data during export?
Ans. Comma, Binary
107. What does cluster index do?
Ans. Speedup select.
108. There are two data sources  in query on one level. How they executed?
Ans. Sequentially.       
109. The best way of reusing class
Ans. Inherit the class and change methods
110. What is difference b/w static and instance method of class?
Ans. Static is called only once.
111.what the developer should do to get an access to the class variable?
Ans. Write special access method parm ()
112. what is the array length of new created of EDT?
Ans. 1
113. When using “Constructor Controlled Inheritance”, what class must all inheritors extend?
Ans. The Constructor Super class.
114. What client types have direct access to database?
Ans.  2Tier,3Tier
115. You can use Query objects and select statements to fetch data from the database. When should you use Query?
Ans. When user input is needed

116. Best way to change class method?
Ans. inherit new, re-assign menu item
117. What step should be completed after importing class objects?
Ans. Recompile                                    
118. When you are importing projects where there is more than one programmer, what should you consider?
Ans. Nothing else – Microsoft Axapta will handle any conflict
119. What should be considered when importing table objects?
Ans. Be aware of changed table id; data may be lost       
120. How should you change the label of an existing system field?
Ans. By creating a new label in a new label file.
121. What kinds of foundation classes exist?
Ans. Lists, struct, maps, sets, Arrays                       
122. How can we see in debugger that a variable has changed?
Ans. It changes its color to red
123. You need to hold temporary 5-10 records Name FamilyName Phone during run of a class, what will you use?
Ans. temporary table
124. What makes this expression Table.setTmpData(Common)
Ans. sets the table ‘cursor’ of the Table to the same data as Common
125. If the DLL you are using demands GUI interaction, where MUST it be based?
Ans. On the Client
126. Where DLL’s should be based?
Ans.  On the client to prevent server registry failure.
        126. System classes to use to plug dll to your project
Ans. DLL and DLLFunction
127. Display method on a table is intended to return the name of the customer. What variants will achieve this?
CustTable ct;
Ans.
Select * from ct where ct.AccountNum == this.CustAccount;
        Return ct.Name;
RETURN (SELECT firstonly custTable WHERE custTable.AccountNum == this.CustAccount).CustName;
128. Re-index ?
Ans. setup on Import options (Administration->Periodic->Data export/import->Import->Advanced)
129. Which of the following are areas where IntelliMorph will help you?
Ans. All forms are designed by IntelliMorph by default
        Automatically adding fields in filed group on forms and report, when added on table field group.
130. Where is the BEST place to add validation code for records inserted by a user?
Ans. In the validateWrite() method on the table
131. What is the sequence of events, when deleting a record on a form?
Ans. DataSource. Delete -> DataSource.ValidateDelete -> Table. ValidateDelete -> Table. Delete
132. Does Microsoft Axapta allow multiple languages running on the same application?
Ans. Yes, Microsoft Axapta's label file system allows you to run multiple languages on one application
133. Where is the label file stored in 3-tier configuration?
Ans. It is stored in the application folder on Application server
134. If we want to copy the whole layer, what files should we copy?
Ans. All objects are stored in “ax<layer>.aod” file.
135. What is the best way to set a break point before a certain error message?
Ans. Find the label id in the label editor and then search the AOT for occurrences of that label. Set a breakpoint at each location
136. How can you add your own Help book to the standard Microsoft Axapta Help TOC?
Ans. All Help projects are Shared projects, and all have “Help” as the first part of their name. To create you own book in the TOC, create a new project and add it to the “HelpApplicationTOC” project
137. What is the best way to change class behavior?
Ans. Extend this class, change functionality in child class, and change the menu item to point to our child
138. What are the IDs used for in Axapta?
Ans. For references: if we change the name of the object, it still works
139. You’re updating much data. What method will you use to report errors to user?
Ans. Use class Infolog. Warning(), Error(), Info(), checkFailed(),…
140. You’ve created a new datatype CustAddr extending GlobalAddress (suppose that’s an existing string EDT). You want to change the length of the string of CustAddr. What’s the best way to do it?
Ans. Change the stringSize parameter on GlobalAddress parent
141. How can the Relations on a data source on a query be automatically updated?
Ans. By setting the “Relations” property on the database to “Yes”.
142. You need to work with list of fields: srt 30 Name, str 30 Address, str 30 AnotherName in your class. What would you use?
Ans. Container                                                                 
143. When should you use a map as a datasource from a form, instead of tables?
Ans. When populating two (or more) different tables from one form simultaneously
144. What is important when importing objects
Ans. Table ids and The need to observe what is in other layers
145. When is a recId generated?
Ans. When saving a record
146. What is the best place to put the validation code for a bound control to be executed when user leaves the control?
Ans. Table’s ValidateField method
147. The customer wants you to make CustTable form behave completely different. What do you do?
Ans. You make a new form, and then change CustTable menuitem to point to your form
148. How does Microsoft Axapta support AсtiveX controls?
Ans. ActiveX controls are visual elements and are supported as from controls
149. If all you see on certain forms in the user interface is text such as ‘@ABC160’, what is most likely the reason?
Ans. The label files did not get deployed
150. You're troubleshooting for a customer running a 3-Tier environment who's complaining that certain forms perfom very slowly. What is the most likely problem and what should you course of action be?
Ans. The Database server is overloaded. More memory is needed.
151. At a certain point in your class you need to ask the user for a customer. What will you do?
Ans. Make an instance of Dialog class, and add a CustAccount lookup like this:
DialogField df = Dialog.AddField(typeid(CustAccount),”Customer account”);

152. You are writing a class that needs user approval to proceed. What is the best way of obtaining that input?
Ans. Use the Box Class.

153. In what situation is it an advantage to create a query as an AOT-object to creating it in X++ code?
Ans. When the same query is used be several different objects.
154. What is the difference between RunBase and RunBaseBatch classes?
Ans. RunBase CANNOT be used for batch processing
155. What happens to the Object id’s during an export?
Ans. Objects can be exported both with and without objects Id’s. It is parameter set at the same time of the export.
156. We write some code for the end-user that extends the current functionality of the core module. But the core module is still being developed. What do we have to do, to avoid the overwriting of our code during the next updates?
Ans. We should save the code on the other layer and compare the layers after each update
157. How MUST a progress bar be initiated when using a Runbase class?
Ans. By calling the progressInit() method on the runbase class.
158. What a Naming Convention used for?
Ans. increase search performance, since Sorting AOT elements in alphabetical order
159. What is the difference between form and web-form?
Ans. Web-form has a limited number of controls
160. How does Microsoft Axapta support database replication?
Ans. Microsoft Axapta does not support replication
161. When needing a report showing the name of an invoiced customer and the IDs of the invoiced items, which table(s) must be used?
Ans. CustInvoiceJour and CustInvoiceTrans
162. A customer transaction can be open or closed. Where is this information stored?
Ans. In the closed field in the CustTrans table

3 comments: