Saturday, 2 September 2017

DYNAMICS AX 2012 INTERVIEW QUESTIONS PART 3

DYNAMICS AX 2012 INTERVIEW QUESTIONS PART 3


1. 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.
2. What are the two most important methods on the Report?
Init(),run(),fetch(),send(),print().
3. When do block the super() method of fetch
Don’t call super() when overriding the fetch method in a report.
4. Can we make a report from wizard, if yes from where
Yes, Tools>DevelopmentTools>Wizards>Report Wizard.
5. 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.
6. 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.
7. 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);
7. 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.
8. What are Queries, how do we use them
You can create a query to retrieve data by using the query classes.w
9. 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.
10. 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.
11. 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
12. Normally what do we attach in Output    – Forms
13. Normally what do we attach in Action    – Classes
14. 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.
15. 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.
16. How can we override a lookup
AOT>Form>DatasSource>Fields>FieldName >Lookup
Form>Design>Field>Lookup.
17. 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.
18. On closing a form name the methods which are invoked
Close(), closed(), finalise().
19. How can we provide user level/user group level security  – By using security keys.
20. What is Visual MorphXplorer, what do we do with that?(Reverse engineering tool has replaced Visual
MorphXplorer)
21. 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.
22. 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.
23. 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.
24. 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.
25. What are the tools you will use to upgrade any object?   – Compare
26. 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.
27. 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.
28. What are the classes, Tables, Forms and Methods used to post the purchase orders.
29. What are the classes, Tables, Forms and Methods used to post the Ledgers.

DYNAMICS AX 2012 INTERVIEW QUESTIONS PART 2

DYNAMICS AX 2012 INTERVIEW QUESTIONS PART 2


1. What are the classes, Tables, Forms and Methods used to post the Inventory.
2. What is the base class to send the on-boad E-mailing.
SysMailer and SysINetMail.
3. What are the storage Dimensions?
Site,WareHouse,PalletId,BatchNumber,SerialNumber
4. What are the Item Dimensions?
Configuration, size,Color
5. 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)
6. 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 insert, update, and delete methods.
7. What is the Runbase Stack?
8. 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++
9. 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.
10. 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.
11. Any module you are good at.    – AR,AP,Inventory,Production.
12. 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).
ClassDescription
ArraySimilar 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.
ListContains elements that are accessed sequentially.
MapAssociates a key value with another value.
SetHolds values of any single type; used when order is important.
StructCan contain values of more than one type. Used to group information about a specific entity.
13. Tables in inventory?
InvetTable,InventTableModule,InventItemLocation, InventDim, InventTrans
BOMTable , WMSShipment.InventColor, InventSize
14. If you manipulate anything which layer would it affect?
The present layer where you are working and below of that layer.
15. What are the components in reports?
Methods , DataSources , Design.
16. How many types of classes are there?
System Classes and Application Classes.
117. Development tools?
Version control , Cross-reference, Code profiler, Debugger, Application Hierarchy Tree,Code Explorer, Reverse Engineer, Number of Records, Embedded Resources,  Wizards, Label.
18. Communication tools
19. Can you say few best practises in ax?
20. What is the difference between sql queries and dynamics queries.
Sql query is Select statement –
Dynamic query – AOT Query and Query class using x++.
21. What is the difference between x++ and c#?
X++ contains code and Sql select statements
C# contains only code.
22.  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.
23. What can’t you store in containers
We can’t store objects in containers.
24. 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.
25. Logic for converting string to uppercase?
StrUpr() -Converts all the letters in a string to uppercase.
26.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.
27. 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.
28. 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.
29. 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,
30. 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.
31. Architecture of MS dynamics AX.
Ax has the three tier  architecture    — 1 . client       2. AOS           3.DataBase.
32. 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.
33. 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.
34. 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.
35. 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.
36. Concept of Different Layer in AX.
syssypglsGlphfxsl1sl2sl3busbupvarvapcuscupusrusp
37. 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.
38. How to create runtime query?
You can create a query to retrieve data by using the query classes.
Query, QueryRun, QueryBuildDataSource, QueryBuildRange, QueryBuildLink,  QueryBuildDynaLink
39. 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.
40. What are transactions?
41. How to lock transactions?
42. 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.
43. What is the default link type property?   –    Delayed.
44. Default join in select statement (Queries) – innerJoin
45. 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.
46. Do we have validate write and validate field in form level?
FormDataSource – validateWrite()
FormDataSourceField  – validate().
47. What are the methods required for posting a purchase order?
48. How to give null in select query?
Select table where table.field == “ ” ;
49. 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).
50. 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.
BenefitDescription
Focused dataA view enables you to retrieve and return only the data that is relevant for a particular user or scenario.
Customized dataA 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.
PerformanceA 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.
51. In which case delete_from and delete() have same result?
When deleting only one record in the table.
52. Explain sales/purchase order processes in AX.
53. Can you just tell the table properties that you can remember?
55. Explain different types of reports?
AOT Reports , Using X++ – Report classes, Using Report wizard.
56. Primary Key in tables (In dynamics AX don’t have primary key)
57. 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.
58. What are all the add- on tools you used in Dynamics AX (It’s an indirect question for AIF)
59. Did you work with EP (Enterprise Portal & Workflow) how can you implement this features into your projects?60. 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.

Labels

#veryusefulcode (1) AIF (8) AOT Maps (1) Args (1) Ax 2009 Reports (2) AX 2012 navigation (1) Ax 2012 Interview Questions (1) AX 7 (2) AX Architecture (1) Ax Backup (1) AX Workflow (2) AX2012 (1) AX2012 R2 (1) Ax2012R3 (1) AX2012R3 Dynamics Connector Step by Step Installation and Configuration (1) AX2012R3 EP Step by Step Installation and Configuration EP R3 (1) AX2012R3 HelpServer Step by Step Installation and Configuration (1) AX2012R3 Rapid Start Connector Step by Step Installation and Configuration (1) AX2012R3 Report Server and Analysis Server Step by Step Installation and Configuration (1) AX7 (1) Best practices (1) Blocking user to enter (1) Collection Classes (1) Container (1) D365FO (3) Data Migration Frame Work ax 2012R3 (1) Deleting duplicate Record from Table – Ax2012 (1) Delivery due date notification workflow in Ax 2012 (1) Development Steps EP (1) Dimensions (1) DIXF (1) DMF in Ax 2012 R3 (1) Dynamics Ax 2012 Interview Questions (1) DYNAMICS AX 2012 INTERVIEW QUESTIONS PART 2 (1) DYNAMICS AX 7 (1) EDT relation Migration Tool (1) EP AX 2012 (1) Ep Lookup (1) Error (1) Event Handler (1) F5 (1) File Handling (4) Filter on AX2012 Listpage (1) filtering (2) financial dimensions in AX 2012 (3) form (1) images (1) Installation and Configration (4) Installation and Configuration (11) Installation of Management Reporter 2012 for AX 2012 (1) Interaction class in ax 2012 (1) Interview Question (1) Interview Questions For Ax 2012 (1) Invent DIm (1) Jobs (2) license (1) List page and form menuitem enable code (1) Methods (1) microsoft Dynamics AX 365FO (1) Number Sequence Generation – AX 2012 (5) Number Sequence2012 (1) OLTP-OLAP (1) Passing Args (1) Passing form caller and menu item caller in ax 2012 (1) Passing Multiple Records Args (1) Posting in Ax 2012 (1) POSTING PURCHASE ORDER (1) Query (1) Query Filter Form (2) Query Ranges in X++ (1) Question and Answer (1) Report (1) Reports Controller class (1) RLS in ax 2009 (1) SALES ORDER IMPORT/EXPORT FRAMEWORK BY DMF (1) Security (1) security roles (1) Security Sysqueryrangeutil (1) Sharepoint 2016 (1) SQL SERVER (1) SSRS (2) SSRS Reports Controller class (2) Table collections & Virtual company (1) Time (1) TIPS AND TRICKS (1) Web service AIF (3) Web Services on IIS (AIF) Step by Step Installation and Configuration (1) workflow ax2012 (1) Workflow installation (1) Workflow Method (3) X++ (1)