Tuesday 28 October 2014

Delete All Transaction in company in Dynamics AX 2009

To delete all the transaction inside a company in the ax 2009 follow up below steps: 


1  go to AOT

2  open the classes

3  search on  SysDatabaseTransDelete class

4  right click on the this class 

5  choose open 

6  click yes on the message box appear to you 

7  info will appear to you “operation completed”

                                          (OR)

If u have admin rights go to Administrator --> common forms --> Company Accounts --> select Company --> Delete. It will delete all the transaction inside the company with company  AX 2009.


Note : In this Company Account we can create a new company and also duplicate the existing compay with transaction

Sunday 26 October 2014

How to take application and SQL Server back up and restore in AX 2009

Steps to take AX2009 Application backup and Database back up from one(live) Server and restore in another(Test) server :

1)      Stop Dynamics AX Windows Service in newly created Test AX Server’s machine

2)      Copy entire Source Live AX Server’s Application-Folder located at (Ex: C:\Program Files\Microsoft Dynamics AX\50\Application)
To know where-about Source Live AX Server App-Folder location 
Goto: Start Menu > Administrative Tools > Microsoft Dynamics AX 2009 Server Configuration
See text in Application-File-Location in Tab:[Application Object Server ]

3)      Paste/Replace folders/files into the targeted new AX Test Server’s Application-Folder
                 To know where-about Test AX Server App-Folder location
Goto: Start Menu > Administrative Tools > Microsoft Dynamics AX 2009 Server Configuration
See text in Application-File-Location in Tab:[Application Object Server ]

4)      Take Database Backup in Source Live AX Server’s SQL-Server

5)      Restore Database in targeted Test AX Server’s SQL-Server

6)      Start Dynamics AX Windows Service in newly created Test AX Server’s machine

Saturday 25 October 2014

Dynamics AX 2009 Workflow Email alert


The following check list for confiure Email functionality fo Workflow in AX 2009
1. User options
a. Maintain the email address of the users .
b. Setup The parameters for receiving the notifications on the Notifications tab especially the two marked parameters for getting the notifications in client and or email.
 
2. Administration>Setup>Email parameters must be setup so that emails can be sent through AX.
3. Basic>Setup>Setting for workflow>settings for workflow to be used by the system to send workflow emails.
4. Configuration of the email template as identified in step 3 above. Basic>Setup>Email templates. FOr setting templates refer to the AX help file. Its a good source of information.
5.  Ensure that the batches to process the alerts and the email messages are active.
      a. Email batches – Administration>Periodic>Email processing> Batch.
          

     b. Alert batches – Basic>Periodic>Alerts
         
6. Workflow configuration is configured properly . There should one default configuration . Additional configurations may be maintained with specific conditions for becoming active.
e.g. workflow on purchase requisition may have following setup
  
One active version per configuration must be maintained.
7. Workflow rules should be defined properly. If the tasks are being assigned on hierarchy basis then there must be a stop condition maintained ( This is the general error that users do not maintained a stop condition.)
8. Setup events when to generate a notification in an approval process.

Sunday 5 October 2014

OOPS Concept in Dynamics AX



Class : Class is the 1st OOPs concept .Class defines the characteristics of objects which includes its attributes , fields  properties and behavior . Let us say we have a class called car , then the color , model number , top speed can be its attributes and properties . Accelerating , breaking , turning will be its behavior

Objects: Objects can be considered as a thing  that performs a set of related functions .Programming objects are used to model real worlds objects. An object is also an instant of a class . For our class Car , Ferrari  will be our object

Instance : One can have an instance of a class; the instance is the actual object created at runtime.  The set of values of the attributes of a particular object is called its state. The object consists of state and the behaviour that’s defined in the object’s class.

Method :Also called as  functions in some programming languages , methods defines the  behavior of particular objects . For our Car class , turning() , breaking ()  will be our methods .

Inheritance : a parent class can inherit its behavior and state to children classes. This concept was developed to manage generalization and specialization in OOP .Lets say we have a class called Car and Racing Car . Then the attributes like engine no. , color of the Class car can be inherited by the class Racing Car . The class Car will be Parent class , and the class Racing Car will be the derived class or child class

Abstraction : representing only the important details without including all the details . For example the car Ferrari can be treated as simple car only .

Encapsulation:The wrapping up of data and functions into a single unit is called as encapsulation . For example the class car has a method turn ()  .The code for the turn() defines how the turn will occur . So we don’t need  to define how Mercedes will turn and how the Ferrari will turn separately . turn() can be encapsulated with both.

Polymorphism: Its an important OOPs concept , Polymorphism means taking more than one forms .Polymorphism allows the programmer to treat derived class members just like their parent class’s members. More precisely, Polymorphism in object-oriented programming is the ability of objects belonging to different data types to respond to calls of methods of the same name .If a Dog is commanded to speak(), this may elicit a bark(). However, if a Pig is commanded to speak(), this may elicit an oink(). Each subclass overrides the speak() method inherited from the parent class Animal. 

Difference between method overriding and overloading


This is a discussion on Difference between method overriding and overloading within the OOPS forum

Overriding is the concept of having functions of same name and signature in different classes. one in the super class can be made virtual and other can override the functionality of virtual one.

Overloading is the concept of having functions of same name, but different signature in same class. They are differentiated by the compiler by their signatures.


Overloading methods
1.They appear in the same class or a subclass 
2.They have the same name but, have different parameter lists, and can have different return types.

Overriding methods

It allows a subclass to re-define a method it inherits from it's superclass 
overriding methods: 
1. It appears in subclasses 
2. They have the same name as a superclass method 
3. They have the same parameter list as a superclass method 
4. They have the same return type as as a superclass method 
5. They have the access modifier for the overriding method may not be more restrictive than the access modifier of the superclass method

Thursday 2 October 2014

Dynamics AX Interview Questions

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 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.  

4.      What are the 4 types of files we need to copy to the standard folder?
     *.aod    - application object data file
    *.ahd    -  Application Online Help Data file 
    *.ald     -  Application Label data file.
    *.add    - Application Developer Documentation Data file
    *.khd    -  Kernel Online Help Data
And other files are 
*.ahi      -   Application Online Help Index files
*.adi      -   Application Developer Documentation Index files
*.ali       -   Application Label Index files
*.alt       -   Application Label Temporary file.
*.alc       -    Application Label Cache file
*. aoi     -    Application Object Index file
*.khd     -    Kernel Online Help Data
*.khi      -   Kernel Online Help Index files

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 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, send,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.

13.  Define IntelliMorph
IntelliMorph is the technology that controls the user interface in Microsoft Dynamics AX. The user                   interface is how the functionality of the application is presented or displayed to the user.
IntelliMorph controls the layout of the user interface and makes it easier to modify forms, reports, and menus.

14.  Define MorphX  
The MorphX Development Suite is the integrated development environment (IDE) in Microsoft Dynamics AX used to develop and customize both the Windows interface and the Web interface.

15.  Define  X++   
X++ is the object-oriented programming language that is used in the MorphX environment .

16.  Differentiate refresh(),reread(),research(),executequery()  
refresh() will not reread the record from the database.  It basically just refreshes the screen with whatever is stored in the form cache.
reread() will only re-read the CURRENT record from the DB so you should not use it to refresh the form data if you have added/removed records.  It's often used if you change some values in the current record in some code, and commit them to the database using .update() on the table, instead of through the form datasource.  In this case .reread() will make those changes appear on the form.
research() will rerun the existing form query against the data source, therefore updating the list with new/removed records as well as updating existing ones.  This will honour any existing filters and sorting on the form.
executeQuery() is another useful one.  It should be used if you have modified the query in your code and need to refresh the form.  It's like
research() except it takes query changes into account.

17.  Define AOT
The Application Object Tree (AOT) is a tree view of all the application objects within Microsoft Dynamics AX. The AOT contains everything you need to customize the look and functionality of a Microsoft Dynamics AX application

18.  Define AOS  
The Microsoft Dynamics AX Object Server (AOS) is the second-tier application server in the Microsoft Dynamics AX three-tier architecture.
The 3-tier environment is divided as follows:
• First Tier – Intelligent Client • Second Tier – AOS • Third Tier – Database Server
In a 3-tier solution the database runs on a server as the third tier; the AOS handles the business logic in the second tier. The thin client is the first tier and handles the user interface and necessary program logic.

19.  Difference between temp table and container.
1. Data in containers are stored and retrieved sequentially, but a temporary table enables you to define indexes to speed up data retrieval.
2. Containers provide slower data access if you are working with many records. However, if you are working with only a few records, use a container.
3. Another important difference between temporary tables and containers is how they are used in method calls. When you pass a temporary table into a method call, it is passed by reference. Containers are passed by value. When a variable is passed by reference, only a pointer to the object is passed into the method. When a variable is passed by value, a new copy of the variable is passed into the method. If the computer has a limited amount of memory, it might start swapping memory to disk, slowing down application execution. When you pass a variable into a method, a temporary table may provide better performance than a container

20.  .What is an EDT, Base Enum, how can we use array elements of an EDT?
            EDT - To reuse its properties. The properties of many fields can change at one time by changing the properties on the EDT. Relations can be assigned to an edt are known as Dynamic relations.
EDT relations are Normal and Related field fixed.
Why not field fixed – field fixed works on only between two tables 1- 1 relation. And Related field fixed works on 1- many tables.so edt uses related field fixed.
            BaseEnum which is a list of literals. Enum values are represented internally as integers. you can declare up to 251 (0 to 250) literals in a single enum type. To reference an enum in X++, use the name of the enum, followed by the name of the literal, separated by two colons . ex -NoYes::No.

21.   Definition and use of Maps, how AddressMap (with methods) is used in standard AX?
Maps define X++ elements that wrap table objects at run time. With a map, 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. Map methods enable to you to create or modify methods that act on the map fields.
Address map that contains an Address field. The Address map field is used to access both the Address field in the CustTable table and the ToAddress field in the CustVendTransportPointLine table

22.  What is the difference between Index and Index hint?
Adding the "index" statement to an Axapta select, it does NOT mean that this index will be used by
the database. What it DOES mean is that Axapta will send an "order by" to the database. Adding the "index hint" statement to an Axapta select, it DOES mean that this index will be used by the database (and no other one).

23.  How many types of data validation methods are written on table level?
validateField(),validateWrite(),validateDelete(),aosvalidateDelete(),aosvalidateInsert(),
aosvalidateRead(),aosvalidateUpdate().

24.  How many types of relations are available in Axapta, Explain each of them.
Normal Relation: enforce referential integrity such as foreign keys. For displaying lookup on the child table.
Field fixed: works as a trigger to verify that a relation is active, if an enum field in the table has a specific value then the relation is active. It works on conditional relations and works on enum type of data.
Ex- Dimension table
Related field fixed: works as a filter on the related table.it only shows records that match the specified value for an enum field on the related table.

25.  When the recid is generated, what is its utility?
when the record is entered in the table the recid is generated by the kernel.it is unique for each table.

26.  Difference between Primary & Cluster index.
Primary index: It works on unique indexes. The data should be unique and not null. Retrieve data from the database.
Clustered Index: It works on unique and non unique indexes.retrieve data from the AOS.

The advantages of having a cluster index are as follows:
·                     Search results are quicker when records are retrieved by the cluster index, especially if records are retrieved sequentially along the index.
·                     Other indexes that use fields that are a part of the cluster index might use less data space.
·                     Fewer files in the database; data is clustered in the same file as the clustering index. This reduces the space used on the disk and in the cache.
The disadvantages of having a cluster index are as follows:
·                     It takes longer to update records (but only when the fields in the clustering index are changed).
·                     More data space might be used for other indexes that use fields that are not part of the cluster index if the clustering index is wider than approximately 20 characters).
27.  How many kind of lookups can be made and how.
              By using table relations
              Using EDT relations.
              Using morphx  and using X++ code(Syslookup class).
28.  How many types of Delete Actions are there in Standard Ax and define the use of each
              None
              Cascade
              Restricted
              Cascade+Restricted.
29.  What is the function of super()
              This method calls the system methods to execute.
It is used to instantiating the variables at the parent class. Used for code redundancy.
30.  Utility and use of find method.
              All the tables should have at least one find method that selects and returns one record from the table that matches the unique index specified by the input parameters. The last input parameter in a find method should be a Boolean variable called for update or update that is defaulted to false. When it is set to true, the caller object can update the record that is returned by the find method.
31.   What  are the different types of Table groups defined on table properties?
              Miscellaneous
              Parameter
              Group
              Main
              Transaction
              WorkSheetHeader
              WorkSheetLine
32.  Multiple inheritance possible or not, if not how can we overcome that.
In X++, a new class can only extend one other class; multiple inheritance is not supported. If you extend a class, it inherits all the methods and variables in the parent class (the superclass).
We can use Interfaces instead of multiple inheritance in Ax.

33.  Do we need to write main method, give reasons
Yes, but to open the class from action menu item we have to create main method of class.

34.   What is difference between new & construct method
new(): used to create a memory to the object.
Construct():  You should create a static construct method for each class. The method should return an instance of the class.

35.   What is the utility of the RunOn property
Application objects such as reports, tables, and methods can run on the application object server (AOS) or the client. An object can also have the RunOn property value set to Called from. Objects set to Called from can run from either the client or server, depending on where the object is called from. This topic describes the RunOn property, tiers that class objects can run on, and hints about using AOSRunMode.
Default value of RunOn for Classes -                        Called from
                            MenuItems            -             Client
36.What is main class used in batch process OR which class will you inherit to make a batch job
RunBaseBatch  class
37.  How can we make a batch job occur at regular interval    - Using RunbaseBatch
38.  What is the main utility of classes in standard Ax  -   For business logic
39.  Which class is called when we create a SO/PO.
SalesFormLetter and PurchFormLetter
40.  What is the basic structure of a form
Methods,DataSources,Design.
41.  Properties of a form datasource
Name, Table, Index, AllowCheck, AllowEdit, AllowCreate, AllowDelete, StartPosition,JoinSource, LinkType.
42.   validateWrite() method can be written in form datasource as well as table level, when should we write it in form DS and when in table. Similar in case of write() method
when we want the validation at the table level means in every form where this table is uses, we can write at the table level.
If we want validations at the particular form and it doesn’t effect to the other forms where this table was used, then we can use form level validations.
43.   How can we call table level methods from form DS (similar methods)
By creating the variable to the table and with tablevariable.methodname()
44.  What is the difference between form init() & DS init()
Form init(): init is activated immediately after new and creates the run-time image of the form.
DS init(): Creates a data source query based on the data source properties.
The form data source init method creates the query to fetch data from the database and sets up links if the form is linked to another form.
45.  When a form opens what are the sequential methods called.
Form init(), DataSource init(), Form run(), DataSource executeQuery(), canClose(), close().
46.  Where is the best place to write code to perform filter in a form
FormDataSource  - executeQuery() and call this method in the design field of the form.
47.  What are the different types of menu items available, explain each of them
Display – for Form
Output  - for Report
Action   - for classes.
48.   Action type menu item is attached to a form but in the drop down the menu item is not appearing, what could be the problem .
49.   Difference between pass by reference and pass by value?
Pass By Reference:
In Pass by reference address of the variable is passed to a function. Whatever changes made to the formal parameter will affect to the actual parameters

- Same memory location is used for both variables.(Formal and Actual)-
- it is useful when you required to return more than 1 values
Pass By Value:
- In this method value of the variable is passed. Changes made to formal will not affect the actual parameters.

- Different memory locations will be created for both variables.
- Here there will be temporary variable created in the function stack which does not affect the original variable.
In case of pass by value, the change in the sub-function will not cause any change in the main function whereas in pass by reference the change in the sub-function will change the value in the main function.
Pass by value sends a COPY of the data stored in the variable you specify, pass by reference sends a direct link to the variable itself. So if you pass a variable by reference and then change the variable inside the block you passed it into, the original variable will be changed. If you simply pass by value, the original variable will not be able to be changed by the block you passed it into but you will get a copy of whatever it contained at the time of the call.
50.   What are the two most important methods on the Report?
Init(),run(),fetch(),send(),print()

52.  When do block the super() method of fetch
Don't call super() when overriding the fetch method in a report

53.   Can we make a report from wizard, if yes from where
Yes, Tools>DevelopmentTools>Wizards>Report Wizard

59. What is a Programmable Section, how we use it in reports
Use programmable sections to add any kind of customized information. To activate a programmable section, activate it explicitly with an element.execute(Number) statement. The Number must be specified in the ControlNumber property for the design section.

60. What is the difference between Auto Design Spec & Generated Design
Auto Design: An auto design is a report design that has a layout that is automatically generated based on the data for the report. You can use auto designs for most common reports. Reusability is available.
This uses Report template and Section template. Header ,Section Group and Footer is not available.
Generate Design or Precision design: You can create a precision design for a report that requires a very precise layout. It doesn’t use Section template and Report template. Reusability is not available.

61. How can we sort the DS, what facility we can get in by placing fields in Ranges
  this.query().datasource(1).addsortfield(fieldnum(tablename,fieldname),sorting:ascending);

62. What is the role of executeSection
You can override the executeSection method for a report section to modify the layout of the section and to modify how the section is printed. If you want to do something before a section is printed, such as go to the next page, this can be coded in the executeSection method.

63. What are Queries, how do we use them
You can create a query to retrieve data by using the query classes.


64. 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.


65. What is the use of Parameter, Enum Type Parameter/Enum Parameter properties of MenuItems?
Parameters:   Specify the arguments that are passed to the object. Optional.
Enum TypeParameter and Enum Parameter:   Choose an enumerated type as a parameter for the Object, and then select an enum value as the EnumParameter property. Optional.
These properties are typically used when one form is used in several different situations. You can change the behavior of the form, depending on the EnumParameter value. For example, the PriceDiscGroup form is used by three different display menu items (PriceDiscGroup_*), which each have a different EnumParameter value. In the form's init method, a switch construct checks the value, and then the form is created accordingly.


66. Why do we provide Configuration key & Security Key?
Configuration key: Configuration keys allow administrators to enable or disable features in the application for all users. Disabling features helps to minimize the attack surface against potential attacks.
Configuration keys are applied to:
·                     Tables
·                     Fields
·                     Indexes
·                     Views
·                     Menus
·                     Menu items
·                     Form controls,
·                     Report controls
·                     Extended data types
·                     Enumerations

Security key: Security keys allow administrators to set security on a user group level. Minimizing access on a user group level helps to reduce the attack surface against potential attacks.
The main reasons to apply user-level security are to:
Allow users to do only their designated tasks.
Protect sensitive data in the database.
Prevent users from inadvertently breaking an application by changing code or objects on which the application depends.
You need to apply a security key to:
·                     Tables
·                     Views
·                     Menus
·                     Menu items
·                     Form controls
·                     Report controls

67. Normally what do we attach in Output    - Reports

68. Normally what do we attach in Action    - Classes

69. What is difference between select & select firstonly statements
The select statement fetches or manipulates data from the database or both fetches and manipulates data from the database. Results of a select statement are returned in a table buffer variable.
If you are going to use only the first record or if only one record can be found, use the firstOnlyqualifier. This optimizes the select statement for only one record. Do not usewhile select firstOnly.
It is a best practice to use the firstOnly qualifier in find methods on tables.


70. What are the keywords used to access data from "multiple companies" and "one company to another company".
A cross-company query returns data for several companies in a single run.
To create a cross-company query:
In X++, use the crossCompany keyword on the X++ select statement.
In X++, set the allowCrossCompany property method to true on an instance of the Query class.
In the AOT, set the AllowCrossCompany property to Yes on a node under Query.

71. How can we override a lookup
AOT>Form>DatasSource>Fields>FieldName >Lookup
Form>Design>Field>Lookup.

72. How do the following methods work in a form DS.
ds.refresh(), ds.research(), ds.reread(), in what situation we should use these methods
Refresh():  Updates the form by refreshing the view of all records in the data source.
Research():  Rereads the current record from the database.
Reread():   Refreshes the database search defined by the query, specified by theFormDataSource.init method.


73. On closing a form name the methods which are invoked
Close(), closed(), finalise().

74. How can we provide user level/user group level security  - By using security keys.

75. What is Visual MorphXplorer, what do we do with that?(Reverse engineering tool has replaced Visual
MorphXplorer)

76. What is the function of Application Hierarchy Tree?
Displays the current object's inheritance hierarchy.
The Application Hierarchy Tree enables you to view information about the parents and children of application objects. For example, you can see all the classes that extend a particular class, or see which data types a particular extended data type inherits from. It also enables you to view the methods, fields, and indexes that are used by tables. Information is available for application and system classes, tables, and data types.
To view information for a single application object
Right-click the object, and then select Add-Ins > Application Hierarchy Tree.
To view information for all application objects
Select Tools > Development tools > Application Hierarchy Tree.
You need to generate cross-references before you can use the Application Hierarchy Tree.
Tables are listed under the Common node in the Application Hierarchy Tree. All tables extend the system table called Common. Classes are listed under the Object node.

77. If you want to monitor the database activity, where can you get that?
            Administration>Reports>DataBase information
            Administration>inquiries> DataBase information
            Administration>Reports>Size of Company accounts

78. Where can we find the Label log and what is its utility?
Tools>DevelopmentTools>Label>Label log.

Use this form to view the history of labels within the system and re-create labels that have been deleted.
View a record of all changes made to the label files.

Overview                                Each label is described in terms of its identification (ID), language, status, label text, and by whom and when it was modified. A label can also contain a description, which is displayed at the bottom of the form.

General                        View information about the selected label.

Button
Recreate                                                                      Re-create the selected label.


79. What is Label Intervals?
The SysLabelInterval table contains the settings that control the interval of label IDs that are used to create new labels through the label editor in MorphX.

80. What are the tools you will use to upgrade any object?   - Compare

81. What is the use of System Documentation/Application Developer Documentation/Application Documentation
System Documentation is intended for developers under the functions subnode there are hundreds of useful functions you will use when programming in x++.
Application Developer Documentation, under this node you find documentation about tables and classes used by Ax. description about tables and classes for developers.

82. What are the 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
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 maily used tables.

83. What are the classes, Tables, Forms and Methods used to post the purchase orders.
84. What are the classes, Tables, Forms and Methods used to post the Ledgers.
85. What are the classes, Tables, Forms and Methods used to post the Inventory.

86. What is the base class to send the on-boad E-mailing.
SysMailer and SysINetMail.
87. What are the storage Dimensions?
Site,WareHouse,PalletId,BatchNumber,SerialNumber
88. What are the Item Dimensions?
Configuration, size,Color
89. What is the difference between RunBase and RunBaseBatch?
RunBase: To create a job or an Action class - a program that carries out processes, such as accepting parameters from the user and then updating records in the database - you use the RunBase framework.
The framework is implemented by the RunBase application class and supplies many features, which include the following:
·                     Query
·                     Dialog, with persistence of the last values entered by the user
·                     Validate
The RunBase class is a framework for classes that need a dialog for user interaction and that need the dialog values to be saved per user.
RunBaseBatch:  You can design your own batch job by extending the RunBaseBatch class. You can also write code to schedule the batch to run. The batch runs on the Application Object Server (AOS)

91. What is the difference between Insert and doinsert.
Insert(): To insert  the records into the database. Secure any related transactions with tts.
Doinsert():These methods should only be used under strict control because they bypass the following:
Any validations that have been set up.
Any code that was written in the insertupdate, and delete methods.

92. What is the Runbase Stack?

93. Difference between sql and x++ statement--SELECT-
1.Table buffer on the FROM in x++ clause ,not the table as in SQL
2.ORDER BY clause precedes the WHERE clause
3.! for negation ,not NOT as in SQL
4.&& and || for logical operator ,not AND or OR as in SQL.
5.* and ? for like wildcards ,not % and _ as in SQL.

JOIN CLAUSE-
1.Join clause has no ON keyword in x++,use WHERE instead
2.Default JOIN direction is left .
3.there are no LEFT and RIGHT keyword for JOIN in x++
4.The FROM clause is optional when:
-No column is listed or
-Only one table is listed in the SELECT in x++

select * FROM CustTable;
select CustTable;              both are same.

OTHERS-
1.The WHILE SELECT statement provides an automatic cursor for return rows in x++
2.There is no HAVING keyword in x++
3.No null values are return in x++

94. What is cluster installation?
Admin - Setup - Cluster Configuration
Click System administration > Setup > System > Cluster configuration.
You can distribute the user load in Microsoft Dynamics AX across multiple instances of Application Object Server (AOS) by creating a load balancing cluster.

95. Steps in creating number sequence?
Basic>Setup>NumberSequences> NumberSequences – Create a new number sequence.
Classes>NumberSequenceReference>LoadModule.
AR>Setup>parameters -  setup code.
Tables>CustParameters  - create method starts with numRefEDT.
Form>FormRun  - Create numberSequenceFormHandler method.
Form>FormDataSource  - Override create method.
   
96. Any module you are good at.    – AR,AP,Inventory,Production.

97. Collection classes
You cannot store objects in arrays or containers. The AX collection classes have been designed for storing objects. The classes are implemented in C++ to achieve the maximum performance (they are system classes).
Class
Description
Similar to the array type except that it can hold values of any single type, including objects and records. Objects are accessed in a specific order.
Contains elements that are accessed sequentially.
Associates a key value with another value.
Holds values of any single type; used when order is important.
Can contain values of more than one type. Used to group information about a specific entity.

98. Tables in inventory?
InvetTable,InventTableModule,InventItemLocation, InventDim, InventTrans
BOMTable , WMSShipment.InventColor, InventSize


99. If you manipulate anything which layer would it affect?
The present layer where you are working and below of that layer.


100. What are the components in reports?
Methods , DataSources , Design.

101. How many types of classes are there?
System Classes and Application Classes.

102. Development tools?
Version control , Cross-reference, Code profiler, Debugger, Application Hierarchy Tree,Code Explorer, Reverse Engineer, Number of Records, Embedded Resources,  Wizards, Label.

103. Communication tools

104. Can you say few best practises in ax?

105. What is the difference between sql queries and dynamics queries.
Sql query is Select statement –
Dynamic query – AOT Query and Query class using x++.

106. What is the difference between x++ and c#?
X++ contains code and Sql select statements
C# contains only code.

107.  What are the link types in Ax?
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.
And the other records also shown in the main 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.

108. What can’t you store in containers
We can’t store objects in containers.
    
109. Difference between arrays and containers
An array can hold only items of same and its declared type. Containers store different types of data types at a time.
You can allocate memory space for an array and fill that space with values later, such as in a loop. This is efficient and performs well.


110. Logic for converting string to uppercase?
StrUpr() -Converts all the letters in a string to uppercase.

111.What is JumpRef()?
The user activates the Go to main table command from the shortcut menu on the control or by pressing CTRL+ALT+F4. The super() call opens the main table that contains data for the field.

112. D.B Abstract and final class.
  Abstract forces the class to be derive subclass and final stops the class not to be derive or inheritance.

113. D.B ValidateWrite and write.
validateWrite(): Executed when a new or updated record is to be written.  Determines whether data is valid and ready to be written.
Write(): Executed when the user inserts a new record or updates an existing one. Calls theFormDataSource.validateWrite method and manages the database write operation.

114. What is dialoge class.
A dialog in AX is a simple form with a standardized layout, created by using the Dialog system class. Dialogs should allow users to enter some simple values.
Dialog Classes- DialogField, DialogGroup, DialogTabPage, DialogText, DialogWindow.
Dialog Methods – addField,addGroup,addTabPage,run,pack,unpack,

115. Pack and Unpack method?
Use the pack-unpack pattern to save and/or store the state of an object, and then later reinstantiate the same object.
Pack():create a pack method to read the state of the object and return it in a container suitable for saving or transporting between tiers. Reading the state of the object implies collecting the value of all its members. If the members are tables (records, cursors, temporary tables) or classes, it must also be possible to read their state.
Returns the state of the object as a container.
Unpack():create an unpack method that takes the packed state and reinitializes an object with it. Construct the object before creating an unpack method.
The unpack method takes the saved state of the object and reinitializes the object with it. It reinitializes the object members according to the values in the container, taking the supplied version number into account.
The method can return a Boolean that signals the result of the initialization process.

116. Architecture of MS dynamics AX.
Ax has the three tier  architecture    --- 1 . client       2. AOS           3.DataBase.

117. Tell us about AIF(MSMQ).
Application Integration Framework (AIF) is the infrastructure within AX with which you can expose business logic or exchange data with other systems. AIF is comprised of three primary components:
1.Services - Enable you to expose business logic written in X++ as a service to be consumed by other applications. Within Microsoft Dynamics AX, you can create, customize, and publish services.
2.Document services - A specific implementation of services in which the Microsoft Dynamics AX business logic is exposed through document services.
3.Consume Web services - In Microsoft Dynamics AX, you can consume external Web services from your X++ code. 

118. How to design a form in AX using X++?
The Form* classes enable you to manipulate, create, modify, or run forms by using X++ code. You can also modify forms during run time so, for example, one or more controls are hidden on a form, depending on the user's selections in the preceding form.
The Form classes are all system classes and are prefixed with Form.
Form, FormRun, FormDesign, FormBuildDesign, FormDataSource, FormBuildDataSource, FormControl

119. What is report builder?
You can create reports by using Report Builder for Microsoft SQL Server Reporting Services. You add information to the report from a report model.
When you create a report by using Report Builder for Microsoft SQL Server Reporting Services, you are using secure views of the tables available in the report model.

120. What is Index, properties in Index and types of Index?
An index is a table-specific database structure that speeds the retrieval of rows from a table. Indexes are used to improve the performance of data retrieval and to ensure the existence of unique records. It's up to the database-specific query optimizer to use available indexes to facilitate efficient data retrieval.
Unique index and non-unique index.

121. Concept of Different Layer in AX.
sys
syp
gls
Glp
hfx
sl1
sl2
sl3
bus
bup
var
vap
cus
cup
usr
usp

122. Difference between bound and unbound controls?
Form controls belong to one of three groups, depending on their data source as follows:
·                     Bound control – associated with a field in an underlying table. Use bound controls to display, enter, and update values from fields in the database.
·                     Unbound control – does not have a data source. Use unbound controls to display pictures and static text.
·                     Calculated controls – uses a method as the data source. An example of a calculated control is the sum of two fields on a form.
123. How to create runtime query?
You can create a query to retrieve data by using the query classes.
Query, QueryRun, QueryBuildDataSource, QueryBuildRange, QueryBuildLink,  QueryBuildDynaLink

124. What is optimistic concurrency control and Pessimistic Concurrency Control?
Optimistic Concurrency Control (OCC) helps increase database performance. Pessimistic Concurrency Control locks records as soon as they are fetched from the database for an update. However, Optimistic Concurrency only locks records from the time when the actual update is performed.
Following are the advantages of using OCC:
·                     Fewer resources are used to hold the locks during the update process.
·                     Records are locked for a shorter length of time.
·                     Records remain available for other processes to update if they have been selected from the database but haven't yet been updated.
The disadvantage of using OCC is that the update can fail if another process updates the same record. If the update fails, it must be retried. This can lead to a reduction in database performance.
OCC makes it possible for other processes to update a record even after it has been fetched. You can catch update conflicts by catching the UpdateConflict and UpdateConflictNotRecoveredexceptions.

125. What are transactions?

126. How to lock transactions?

127. What are macros?

              
Macros act as a container for defining variables used for frequent tasks. The purpose of macros is to make statements easy to reuse. A macro can’t be executed independently as a class.
An advantage macro is that the maintenance is done in only one place.
Three types of macros
Macro libraries – is a standalone macro that contains a collection of local macros.
Standalone macros – is created by using the macro node in the AOT.
Local macros  -  is declared with in a method.

128. What is the default link type property?
   -    Delayed.
129. Default join in select statement (Queries)  innerJoin

130. Difference between validate write and validate field?
validateWrite(): Executed when a record is written to the database, before the data change is committed in the database.
validateField():Executed when you leave a field in a record. For example, after entering changes to a field on a grid control, you could click another field in that same record or on a different record. Or you could click another control on that same form.
The super() method invokes field validation checks, as guided by the value of the Validateproperty.

131. Do we have validate write and validate field in form level?                 FormDataSource – validateWrite()
    FormDataSourceField  - validate()

132. What are the methods required for posting a purchase order?

133. How to give null in select query?
Select table where table.field == “ ” ;

134. What is cache lookup and IsLookup what is it used for?
CacheLookup : Determines how to cache the records retrieved during a lookup operation.
            Types -  None , NotInTTS, Found, FoundAndEmpty,EntireTable.
IsLookup : For report models, it specifies whether the table information is incorporated into other tables that reference it when a report model is generated.
For OLAP cubes, it determines whether to generate a consolidated dimension or a distinct dimension. You can specify one of the following values.
·                     Yes - Indicates that attributes from the table are to be consolidated into the parent dimension (star schema).
·                     No - Indicates that a separate dimension is to be generated for the table (snowflake schema).

135. Difference between table and views?
A Microsoft Dynamics AX view is a virtual table that contains the data records and fields that are specified by a query.Like a table, a view uses fields and rows to represent data records. However, the data in a view is not stored as a database object but is dynamically created when the view is accessed. A view uses a query to retrieve data fields from one or more database tables.
When you create a view, the view definition is generated and stored in the database. When that view is accessed, the view dynamically retrieves the data that satisfies the view definition.
Views are read-only. The data fields and tables that a view uses cannot be updated from that view.
Benefit
Description
Focused data
A view enables you to retrieve and return only the data that is relevant for a particular user or scenario.
Customized data
A view enables you use a complex query to create a highly-customized set of data. For example, a view often represents data as a single table that was retrieved from multiple joined tables and used many conditions.
Performance
A view can improve performance by returning only relevant fields to the user. In addition, a view definition is compiled which may provide better performance than calling an equivalently complex query.




136. In which case delete_from and delete() have same result?
When deleting only one record in the table.
137. Explain sales/purchase order processes in AX.
138. Can you just tell the table properties that you can remember?

139. Explain different types of reports?
            AOT Reports , Using X++ - Report classes, Using Report wizard.

140. Primary Key in tables (In dynamics AX don’t have primary key)

141. What is the default index for a table?
The system index is created on the RecId and DataAreaId fields if the DataAreaId field exists. Otherwise the system index is created on the RecId field. You can see system indexes in the database but they aren't visible in the AOT.

142. What are all the add- on tools you used in Dynamics AX (It’s an indirect question for AIF)
143. Did you work with EP (Enterprise Portal & Workflow) how can you implement this features into your projects?

144. Difference between this and element?
 this & element: this can be used in any objects to reference the current object and member methods.
In forms the collection of objects is contained within a FormRun object. You can reference members in the outer formrun object by using the element reference.
If your code is placed at the top level there are no functional difference between this and element.
If your code is placed in a formdatasource but this will reference the datasource but element will reference the formrun.
You cannot use element to refer table or class object.
145. COM & .NET Business Connector
146. Concurrent user & Named user
147. Primary key & Foreign key
148. AOS Load balancer concept/Clustering
149.  AX 2009 Debugger concepts?
Use this debugger to debug X++ code that is running on the following:
·         Microsoft Dynamics AX Business Connector
·         AOS
·         Microsoft Dynamics AX Client
The debugger windows.         1. Code           2. Variables     3.Call stack     4.Watch           5.Break points 
6. Output



150. Cross reference tool ?
The Microsoft Dynamics AX cross-reference system allows you to see the relationships between objects. You can see the following:
·         Which other objects use the current object
·         Which other objects the current object uses
For example, you can get a list of every piece of code that uses a particular method, or you can see which forms use a particular table field. You can also get information about where labels are used in the application. 
151. Document Management
152. Print Management
153. Caching mechanism in AX ?
            Caching is to remember the information already retrieved from the database and use this memory when the same data is needed again.
Drawback, if the remembered information is no longer valid this could compromise the consistency of the  database as the updates are made based on the invalid data.
Read ahead caching , single record caching, Entire table caching, Record view caching, Display method caching.
154. What is cloud computing? How it is configured in AX?
155. Difference between parameter table and Normal table?
The parameter system design pattern holds static setup information for the modules in a company, such as information on the national currency, the posting method, and so on. There is one instantiation of this pattern per module.
The parameter system should be set up as described in this topic. The parameter record is automatically created by the system and has the following:
·                     A parameter table
·                     A parameter form
·                     A parameter menu item
There should be one parameter table per module.
Parameter tables have a single record per company, holding the required parameters for the module. The record is cached. To enable the Found-cache, a key is defined.
Add an integer field called key. It should have the Visible property set to No

156. What is Configuration form in Ax?
            Administration>Setup>System>Configuration   -- displays all the module configuration keys and we can enable or disable the key from this form.
157. How to change Standard table as temporary table ?
            By changing the table property to Yes and  Use the setTmp table method to make a non-temporary table temporary rather than creating a copy of the table, and then making it temporary.
158. What is difference between Auto design and Generate design ? If we uses both designs in a report what design will be print?
            Report prints  - Generated design.
159. Oops concept what doesn’t support in Ax?
            Multiple inheritance and method overloading
160. Instead of multiple inheritance what we use in Ax?
            Interfaces
161. How to open exe file in Ax?
            Ax32.exe  - "C:\Program Files\Microsoft Dynamics AX\50\Client\Bin\Ax32.exe"
162. What is table properties of formRef and ReportRef ?
For tables where the Table Group property has been set to Group, Main, or WorksheetHeader, you must do the following:
·                     Have a form to maintain the table records.
·                     Set the FormRef property to the name of a display menu item.
The form and the display menu item that are used to start the form should have the same name as the table. An example of this rule is the CustTable table in Microsoft Dynamics AX.
Note
Don't set the FormRef property for tables where the MaxAccessMode property is set to NoAccess. These tables are not used in a form.
Specifies the display menu item that is activated when a table is referenced.
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 to display a form that has the same name as the table.
The FormRef property of a table lookups display menuitems.
163. How many types of exceptions are there in Ax?
            15 types of exceptions in Ax are -------
Info, warning,deadlock,error,internal,break,dderror,sequence,numeric,CLR error,Code access security,UpdateConflict,UpdateConflictNotRecovered,DuplicateKeyException,DuplicateKeyExceptionNot Recovered.
164. Access modifiers and Method modifiers ?
Access Modifiers: All methods of a class are always available to code in the class itself. To control access from other classes, and to control inheritance by subclasses, X++ has three access control modifiers for methods:
Classes are treated as public if you do not specify an access modifier.
public :  Methods that are declared as public can be used anywhere the class is accessible and can be overridden by subclasses.
protected : Methods that are declared as protected can only be called from methods in the class and in subclasses of the class where the protected method is declared.
private : Methods that are declared as private can only be called from methods in the class where the private method is declared.
Method Modifiers :  abstract ,client,server,display,edit,final,static,public,private,
protected.

165. How many types of dimensions in inventory?
            Item dimensions – Configuration,size,color
            Storage dimensions – Site, Ware house, PalletId, Batch number, Serial Number.
166. If we create table relation and EDT relation for the same field in the table which relation the field uses?
            Table relation.

167. What is Composite query where we can use?
            A query with in another query is called Composite query. Uses in the Query node in the AOT.

168. Can run the form on server side?  --   No
169. Difference between table delete and form delete?
170.  What is section template and report template?
Report Template: A report template can specify the sections that a report includes, such as a page header and a page footer, page numbers on each page ,company logo ,the controls included in each section, and the layout of the controls. Only reports based on an Auto design inherit changes that are made to a report template, Generate design doesn’t inherit changes to report template.
Section template:  This makes it possible to define sections one time and reuse them many times. This is used for elements appearing in more than one report.
171. When you are creating a table what is the default table group?  -   Miscellaneous

172. Where is the best place to write the logic in Ax?
            Classes, try to avoid the code in the forms.
173. what is the thin and thick or fat client in the configurations?
            Thick client has the direct access to the database.