Interview Questions

Thursday, October 16, 2014

Exporting the Data from AX to CSV file

Hi All,

Today I want to share a code for exporting data from AX to CSV file with an example of Invent table.

static void ExportDataToCSV(Args _args)
{
    Query                                 q;
    QueryBuildDataSource     qbds;
    QueryBuildRange             qbr;
    QueryRun                         qr;
    CommaIO                         commaIO;
    FileName                          fileName;
    InventTable                      inventTable;
    ;
   
    fileName       = WINAPI::getTempPath() + "ItemDetails" + ".csv";
    commaIO      = new CommaIO(fileName,'CSVFile');
   
    q                  = new Query();
    qbds             = q.addDataSource(tablenum(InventTable));
    qbr               = qbds.addRange(fieldnum(InventTable,ItemId));
   
    qr                = new QueryRun(q);
   
    commaIO.write("ItemId","Item Name","Item Type","Item GroupId","Dimension GroupId","Model GroupId");
    while( qr.next() )
    {
        inventTable = qr.get(tablenum(InventTable));
       
        commaIO.write(inventTable.ItemId,inventTable.ItemName,enum2str(inventTable.ItemType),inventTable.ItemGroupId,
                      inventTable.DimGroupId,inventTable.ModelGroupId);
    }
   
    WINAPI::shellExecute(fileName);
}

Friday, September 5, 2014

Process flow from Opportunity to Sales Order creation in AX 2009

Hi Guys,
Today I am going to tell you about a process from Opportunity to Sales Order Creation.

Steps From Requisition to Sales Order

Step 1: First of all, we have to select CRM module.

Step 2: Now, you have to select Opportunities Details in Common Form section.

Step 3: Here you have to create 1 Opportunity.

Step 4: Now you have to click on Update Button then select Contacts.

Step 5: In this form you have to a contact and also in Contact Info tab you have enter the Mobile Number.

Step 6: Now click on Inquiry button and then click on Business Relation.

Step 7: Here Goto Functions button then click on Convert to customer button.

Step 8: Now go back to the Opportunity Form.

Step 9: On this form click on Functions Button and then click on Create Quotation.

Step10: Now when you click OK, then one quotation will create.

Step11: Now in Quotation Line, you have to select Route ID.

Step12: In this form you have to go at Dimension Tab and then Fill Warehouse.

Step13: Then you have to confirm that quotation.

Step14: After Confirmation 1 Sales Order will create.

Step15: Now you have to confirm that newly created Sales Order.

Task Done.

Note : Please feel free to write any query or comment regarding this post.


Wednesday, September 3, 2014

How to print Fibonacci Series in AX through code ?

//Write this code in job
static void Fibonacci(Args _args)
{
 int n =10;
    int a;
    int b;
    int c=0;
    int d=1;
    for( a=1;a<=n;a++)
    {
        info(int2str(d));      
        b = c;
        c = d;
        d = b + c;        
}
}

How to print second highest number in any table in AX 2009 ?

static void Maxvalue(Args _args)
{
   Testtable               t1;
   int                         i; // Use int64 if value is long or high
   ;
   while select t1 order by accounts desc
   {
       i++;
       if (i == 2)
      {
              info(strfmt("%1",t1.Accounts));
      }
   }
}

Thursday, August 28, 2014

Free Text Invoice in AX 2012

FREE TEXT INVOICE in AX2012:
DESCRIPTION
In business, sometimes processes require that items are sold which are not directly purchased. By using Microsoft Dynamics AX 2012, you are able to sell an item using free text invoice, as well as enter the unit price and quantity for better visibility.
One of the many improvements introduced to free text invoices in Microsoft Dynamics AX 2012 includes the ability to enter quantities and unit prices on free text invoice lines – since the option to input price and quantity in free text invoice was not available in earlier versions of Microsoft Dynamics AX.
With Microsoft Dynamics AX 2012, a free text invoice line can be used to sell a quantity of any kind of goods, services, or rights – providing unit price and quantity information to the customer. It also helps basic amount calculation, and it helps to better identify and explain charges to customers.
This article will describe how you can use unit price and quantities in free text invoice of Microsoft Dynamics AX 2012.
What is changed in Microsoft Dynamics AX 2012?
In Microsoft Dynamics AX 2009, there is no scope of entering unit price and quantities in free text invoice.
In Microsoft Dynamics AX 2012, improvement has been done to include unit price and quantities in free text invoice.
The Process
Let’s use ABC Company as an example – ABC Company wants to sell the surplus goods that are left over from a large project recently completed. The goods were not purchased through the inventory system; therefore, they cannot be sold through a sales order.
Instead, they must be sold through a simple free text invoice transaction. A subcontractor has requested to purchase 15 pieces and ABC Company agreed to sell all 15 for USD $50.
To create a free text invoice with quantities and amounts, follow these steps:
1.    Click Accounts receivable > Common > Free text invoice > All free text invoices.


Fig 1: Navigation path for a free text invoice
2.    Click New > Free text invoice to create a new free text invoice.

 Fig 2: Click New to create a new free text invoice
3.    Select a customer in the Customer field, and enter any additional information.

Fig 3: Select Customer and other information in the Free Text Invoice Header
4.    Click Add Lines in the Invoice Lines grid.

Fig 4: Click Add Lines in the Invoice Lines grid to create a free text invoice line
5.    In the Description field, type a description for the invoice line.
6.    In the Main Account field, select the ledger account to be used for posting.
7.    Select Sales Tax Group and Item Sales Tax Group.
8.    In the Quantity field, type 15 as a number for the quantity.
9.    In the Unit price field, type 50 as an amount for each quantity in the invoice line. Notice the Amount field is updated with the extended amount.

Fig 5: Add details of Quantity and Unit Price in a free text invoice line
10.  Click Charges and add charges if required.

Fig 6: Click Charges in the Action pane and add Charges in the free text invoice line
11.  Click the Total option in the Action pane to check the Total. Check that the Subtotal Amount, Sales Tax, Charges and Invoice Total are correctly calculated.

12.  Post the free text Invoice.
Exceptions: Free Text Invoices without Quantities
When a quantity or unit price is not available for the free text invoice line, the fields can be left blank.
For example, if you do not have a unit price and quantity for the line, only a total amount for the line, you can ignore the Unit Price and Quantity fields and then enter an amount for the line. The system will display the amount entered, and the Unit Price and Quantity fields will remain blank.
You can also enter a Quantity and enter an Amount, leaving the Unit Price field blank.


Tuesday, July 29, 2014

Dirty tricks on Ax License


In the
world of Ax, Licenses play a major role. To continue with our day to day work,
at times, we will need to do some dirty work too …

This
entry is result of those dirty works . Let
me go through the following topics:

  • Copying License from one data
    base to another
  • Removing License of a
    particular module
  • Solving Sync issues after
    removing license
  • Working without licenses!!!



Copying License

<<Applicable when you already have this license of a
module in another database and dont have a License file>>

In Ax, Licenses are stored in Database. The tables used as data
source in License Information form are:

1. SysLicenseCodeSort
2. SysConfig

I didn’t do any micro research here, but, quickly jumped into
conclusion that License is stored only these tables as no other tables are
declared or used. 

Euphoria.. !!  Copying these tables from another database will solve the
purpose :)

So, everything we need to do now is:

  1. Backup and truncate records from
    Destination DB
  2. Copy
    records from Licensed DB. This can be by:

  1. Exporting and importing records
    • Export records using export
      tool.
    • Import the exported records.

Or

  1. Cross database query.
    • Insert into
      <<Destination DB>>.<<Tablename>> (Select * from
      <<LicensedDB>>.<<Tablename>>)

PS: But, after doing this, I found that original developer
license is gone. When I imported basic license again, I had all modules


Removing License of a module:

Sometimes, developer environment may have full license and
production environment may not. To simulate environment, we will have to remove
License of few modules.

This can be done as follows: (But, before doing this, make sure
that you have a backup of your database.)

  1. Click Administration > Setup > System > License information
  2. Goto Modules Tab
  3. Select
    the module and delete the LicenseCode
  4. Save and
    synchronize when prompted.

Solving Synchronization issues

Sometimes, after removing the license, synchronization will
fail. This is because a field, having configuration key of a removed module, is
part of an unique index.

For example, if Warehouse Management License is removed from a
DB having Demo data, we will get synchronization error on InventDim Table.

This is because, field WMSPalletId is a part of Warehouse
Management configuration Key. When that license is removed, this field gets
disabled and indexed set of fields will now have duplicate records.

There are many ways to solve this, like

  1. Make the index as non Unique. or
  2. Delete
    duplicate records from Database using a set of Sql queries. or
  3. In the
    EDT of this field, remove the configuration key. How? See below section.

Working without License

It is not impossible to

  • remove a configuration key
    from an EDTor field
  • Make a configuration
    independent of License
  • Make entire Ax License free!!

Follow these steps:

  1. Export the EDT or Config key to an
    xpo file
  2. Remove
    the config key or license in the xpo
  3. Import
    the file back.

To make Ax License free, export all configuration keys into an
xpo and edit it 

If this is first time and you dont have license to open AOT,
then you can import the xpo from command prompt as

Ax32.exe -startupcmd=autorun_"<<xml file locating the
xpo>>"

Tuesday, July 15, 2014

How to set Vendor wise Item price in AX 2012?

Hi all,
        Today I am going to tell you that if you need different item price for different vendors then what you have to do-

For this requirement, You have to post a journal from Sales and Marketing Module.
Then create a new journal. As given in below image.

Then create a new line where you have to select some options like, Table/Group/All. This will effect your options that for whom you are going to effect this price.
Table : It reflects that Item Price will effect a particular user.
Group: It is for User group
All: It is used for all vendors

Now, Validate and Post this journal


How to enable Create Purchase Reuisition button in AX 2012?

Hi, Today I am going to tell you that if your NEW button of Purchase Requisition is not enabled then what you have to do-

Goto System Administration module
Then Select your user name
Then Create a Relation with a Worker
Then Click Save then OK
Now, Check you New button of Purchase Requisition. 

Monday, July 7, 2014

Details information for Print date in AX through X++

//Detailed information of Date Print
static void PrintDate(Args _args)
{
info(date2str(systemdateget(),123,2,1,2,1,4));
}

//Here in the INFO line:
1. 123 = Date Month and Year
You can change the order as per your requirement like. 123, 321, 213

2. Systemdateget()= Through this method you will get current system date

3. After 123 the digit 1 is used to show blank space after Date.
Example : 01 01 2014
You can change it with 1 to 4.
          1 Means Space between date and month and Year
     Example : 01 01 2014
          2 Means Dot(.) between date and month and Year
    Example : 01.01.2014
          3 Means Dash(-) between date and month and Year
    Example : 01-01-2014
          4 Means slash (/) between date and month and Year
    Example : 01/01/2014

4. Now in Info Line 2,1,2,1,4
    Here 2 Means Date's Digit
             1 Means Blank Space
             2 Means Month's Digit
             1 Means Blank Space
             4 Means number of Year's Digit

Friday, July 4, 2014

Multiple Tables in field Lookup method

How To use Multiple Tables in Form LookUp

public void lookup()
{
  Query                   query = new Query();
  QueryBuildDataSource    qbdsPurchTable,QbdsInvntQO, qbdsInventDim;
  QueryBuildRange         qbrVendId,qbrPurchStatus,qbrPurchType;
  QueryBuildLink          qblink1, QbLink2;

  SysTableLookup  sysTableLookup = sysTableLookup::newParameters(tableNum(PurchTable), this);
  ;//breakpoint;
  qbdsPurchTable = query.addDataSource(tableNum(PurchTable));

  QbdsInvntQO = qbdsPurchTable.addDataSource(tableNum(InventQuarantineOrder));
  QbdsInvntQO.relations(false);
  QbdsInvntQO.joinMode(JoinMode::NoExistsJoin);
  qblink1 =  QbdsInvntQO.addLink(FieldNum(PurchTable,PurchId),FieldNum(InventQuarantineOrder,TransRefId));

  qbdsInventDim = QbdsInvntQO.addDataSource(tableNum(InventDim));
  qbdsInventDim.relations(false);
  qbdsInventDim.joinMode(JoinMode::NoExistsJoin);
  QbLink2 = qbdsInventDim.addLink(FieldNum(InventQuarantineOrder,InventDimId),FieldNum(InventDim,InventDimId));

  qbdsPurchTable.addRange(fieldNum(PurchTable, OrderAccount)).value(PurchTable_InvoiceAccountGrid.valueStr());
  qbdsPurchTable.addRange(FieldNum(PurchTable, PurchStatus)).value("Invoiced,Received");
  QbdsInvntQO.addRange(fieldNum(InventQuarantineOrder, Status)).value(queryValue(InventQuarantineStatus::Ended));
  qbdsInventDim.addRange(fieldNum(InventDim, InventLocationId)).value("102018");

  sysTableLookup.addLookupfield(fieldNum(PurchTable,OrderAccount));
  sysTableLookup.addLookupfield(fieldNum(PurchTable,PurchId),true);
  sysTableLookup.addLookupfield(fieldNum(PurchTable,PurchStatus));

  sysTableLookup.parmQuery(query);
  sysTableLookup.performFormLookup();
}

Multi-select lookup Dynamics AX 2012

Multi-select lookup Microsoft Dynamics AX 2012
Normally a lookup allows only one option, but a multi-select once allows one or more options.  Here we are going to show you how to do it with only one command.
First, we have to create a physical query; in this case called “AND_Consult”:
To generate this query we will base in a table, for this example called “AND_TestMult”:
Now, we need the field that we will filter, in this case called “Name”:
After that, we will create a form called “Lookup”:
In this form we add a single code to make the multi-select lookup:
Finally, this is the multi-select lookup:
And there are the multi-selected names.
We have demonstrated that we can improve our AX 2012 programming using a single command.
 Normally a lookup allows only one option, but a multi-select once allows one or more options.  Here we are going to show you how to do it with only one command.
First, we have to create a physical query; in this case called “AND_Consult”:

How to get Configuration Port Number through x++ code (AX 2012)

//Write this code in Job
static void FindPortNumber(Args _args)
{
    Str PortInfo;

PortInfo=strfmt("Port number of AOS IS: %1",int2str(Session::getAOSPort()));

info(PortInfo);

}

How to setup Business Relation Type in AX 2009

Hi All,
          Today I am going to tell you that if you need to add business relation then how can you accomplish this task. In this image if you want to add Type ID then how can you complete this task?


Solution : GO To CRM module > Setup > Contact Management > Relation Types.


Task Done.

Thursday, July 3, 2014

Error "Parameter setup of either language, currency, or type not specified. This is required to create a new prospect." in AX 2009

Hi All,
          Today I am going to tell you that if you will Face an Error "Parameter setup of either language, currency, or type not specified.  This is required to create a new prospect." during opportunity creation then, How you can solve this error.


Solution : Goto CRM module > Setup > Parameters
In this form you have to enter three values.
1. Language
2. Currency
3. Type


Task Done.



Friday, June 20, 2014

Latest Interview Questions with Answers for AX 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.

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

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

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.