What is an Intermediate Language?
(IL) Intermediate Language Or (CIL) Common Intermediate Language Or (MSIL) Microsoft Intermediate Language, is one of the Core component of the .NET Framework. Any .NET source codes written in any .net supportive language (C#,VB.net etc), when compiled are converted to MSIL. This MSIL, when installed or at the Runtime, gets converted to machine code. The Runtime conversion of MSIL code to the machine code is handled by a component called as the Just In Time (JIT) Compiler.
Is multiple inherticance possible in AX?
No
It can be achived through interfaces.
Interfaces : It doesnt have method definition.
void calculatew()
{
}
class classz implements interface
void calculatew()
{
a +b;
}
Id method overloading possible, or function overloading possible in AX ?
no - it doesnt allow to create another method with same name
Abstract and final key words
abstarct - no need to create object, y?? when we know that we have to create object of child classes only, I will make the class as abstarct and i use the concept of constructor controlled inheritance
DataDictinary ->AOT
Table - collection of rows and columns
EDT ?? - Inheritance, code easy readability, lookups, and filter
- 2 RELAtions [Normal and RFF [where clause] in 2009 in 2012 table reference
example : select * from custtable - is normal relation
select * from custtable where gender == female is RFF
How to add columns to the Lookups
1) Index,
2) Titlefield1 and Titlefield1
3) autolookups
How to get lookups?
In 3 ways
- EDT
- AutoLookup
- Relations
what is base enum ?
Set of literals or constants which will never change
- example [week - s,s,m,t,....] enums are stored as integers and max - 250
can be accessed by using :: [scope resolution]
why do we use index
- faster performace in select queries
Not to allow duplicates
FieldName Followed by Idx = AccountNoIdx
Field groups in tables ?
Autoreport - ctrl + p
Autolookup
almost all the fields should fall under a fieldgroup - on the forms - field groups form as Group control
Relations on table :
How one table is related or linked to another
Normal - CustTable.accno == custTrans.accno
RFF - paid == custTrans.paid [secondary table on enums]
FF - custTable.gender == male [primary table on enums]
What are the methods on Table ?
initvalue()
validatefield()
validatewrite()
modifiedfield()
validatedelete()
delete()
update()
insert()
forcible inserts/delete/updates
dodelete()
doinsert()
doupdate()
Macros?
macros are resuable components
macros will reduce lines of code
pre-processor
no debugging
faster as they are already compiled
3 ways
- local macro
- aot
- macro library
can we pass values to macro ? yes via strfmt %1
Forms : ALL below questions are answered on below link.
https://d365solution.blogspot.com/2019/02/forms-interview-question-in-d365.html
When u close the form?
canclose()- boolean, close()
Ok command buton - closeok(), canclose(), close()
Save a record from the form?
when u create a new record?
how do u do filteraions on the forms????
executequery and use queryBuildRange
How t\do you link teh datasources on the form??
How many link types are available on the datasource??
How to u pass values from one form to another form
what is args class??
How do u implement progress bars::
sysoperationprogress class - set total, inccount()
HourglassIndicators - startlenoperation(*), elo()
Runbase framework?
dialogs, progress bars, to run a particular business logic
RunbaseBatch()
dialogs, progress bars, to run a particular business logic. but we can schedule this class to run periodically [recurrance button]
cd, main, run, pack, unpack, description, getfromdialog, dialog, cangobatchjournal
Collection classes? Continer, array, List, Set, Map
What is temporary table?
Table table will not hold the data permanently
- Temporary property on table "Yes" makes the table sas temporary table
- Where is the data stored ? wehreevr the first record is created.[ client, server]
when the record is getting created from form, report
If the date is inserted from table - always the file is created on server
class - runon property - calledfrom, client, server
If the class is getting called from Form - the business logic will run on client
If the class is getting called from table and the calss runon property is seto to called from - then he business logic will run on server
File handling?
1) txt file [txtbuffer- settext,gettext,fromfile,tofile]
comma seperated file>>> csv , commaio class
infielddl,outfieldl,read(),wriote(), recorddelimters, status ok....
xml >> xmldocument - getelementsbytagname, length
xmltextwriter - writestartdocument, endocument, writelement, elementstring, close
what is winapi class?
winapi class will help to do all the things which u can do in the operating systems
1) moving file
2)deleting, renaming, copying, getting the disk space, shutdown....
queries?
why do we use queries?
queries are user interactive, faster, compiles, reusable components
query, queryrun,querybuilddatasource,querybuildrange
if(qr.prompt())
what is difference between temporary table and container?
when there are more than 50 columns then we go for temp tables
and also there are some advantages using temp tables - we can create index, methods , fieldgroups
How do u share tables across the companies?
Table collections and virtual companies
when is configuration key used?
To enable and disable the features for all users [tables, fields, indexes, form controls, edt.enum...etc]
Security key for set of users or usergroups
- tables, forms, report, menuitems etc
RLS [Record level security]
What are display methods?
display methods will help you to show the data from some other table or hardcoded strings..these are not bound controls an we cannot use filter or sorting options
Surrogate Key
A surrogate key is a system generated value that acts as the primary key of a table. This value is typically used instead of a set of fields called the natural key which would typically act as the primary key of a table. Microsoft Dynamics AX 2012 uses RecId as the surrogate key.
With Microsoft Dynamics AX 2012 supporting table inheritance
The Organization table is also a base table because it is extended by two derived tables: NonProfitOrganization and GovernmentOrganization.
Date effectiveness is an ability of the application to associate valid from and to dates with the application artifacts. For example, an agreement can be valid between a range of dates; similarly interest rates are assigned based on start date and end date association
----------------------------------------------------------------------------------------
An Application Object Server (AOS) is a service that runs most of
the business logic. This runs continuously on a central server
The Application Object Server (AOS) is the Microsoft Dynamics AX
application server. The AOS is where most of the business logic is executed.
The AOS performs many tasks. Some of the most important tasks include:
• X++ runtime: It runs the X++ code which provides most of the
business logic in Microsoft Dynamics AX.
• Security: It enforces security to manage access to data and
functionality.
• Session management: It manages client sessions.
• Web services: It is a web service endpoint.
Enterprise Portal pages are displayed through a web browser. A subset of
functionality and reports are available on the portal
The .NET Business Connector is a client that has no user interface. It is
designed for other applications to access the Microsoft Dynamics AX business
logic.
The Application Object Tree (AOT) is a tree view of all application elements in
Microsoft Dynamics AX.
Natural key
You use the values in one or more columns to uniquely identify a record. The column or columns contain meaningful data values. For example, you could use CompanyName as a natural key for the records in a table.
What are Maps ?
Maps are used to link tables. By creating a map, fields can be
accessed in different tables if the fields are of similar types but have
different names. For example, a class that implements functionality
to process data in the tables. If these tables use identical names for
the columns, you can reuse data processing classes.
What are views in d365?
Views are read only data representations that combine multiple table
objects. Views present a selected set of rows and columns by joining
different tables through data sources and relations between them.
Frequently views represent a subset of fields from a single table to
simplify reporting.
When a view is created, 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 synchronized like tables. When a view is synchronized, the view
definition is saved to the database. Synchronization of an existing view causes
the definition of that view to be dropped and re-created in the database
What are Extended Data Types ?
Extended Data Types are customized data types based on the
primitive MorphX data types including strings, integers, reals, dates,
times, enums, or containers.
What is Base Enums ?
Base Enums are a list of literals that can be used throughout the
development environment in MorphX. Enums (enumerable type) are
an extended data type that inherits from a base enum.
What is IntelliMorph ?
IntelliMorph is the term given to the technology that adjusts the layout of forms
and reports which use the modified field group. Adding new fields to a field
group can be a powerful technique for updating forms that use field groups with
a new field.
A Privilege is a group of related permissions that are required to perform a duty.
it is recommended to
group privileges into duties and assign duties to roles.
Duties are a group of related privileges required to perform a task.
Duties are grouped into the following six Process Cycles.
• Conversion cycle
• Cost accounting cycle
Roles are a group of duties that are required by an end-user to do his or her job
based on the end-user's role in the organization.
only two options (yes or no) as to whether a customer account is
on hold.
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.
Pessimistic concurrency was the only option available in Microsoft Axapta 3.0 (now a part of Microsoft Dynamics). You can now choose which concurrency model to use—optimistic or pessimistic.
System Index
Microsoft Dynamics AX requires a unique index on each table so if there are no indexes on a table or all the indexes are disabled, a system index is automatically created. 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.
These tools include the following:
• X++ Editor
• X++ Compiler
• X++ Debugger
• Visual Studio
• Visual Studio Debugger
New(): This method instantiates a new object.]]]
Main
The main() method is the entry point when the class is executed from a menu
item. The method is static. It defines and initializes the object. Notice that new()
should never accept any parameters. The main method receives one formal
parameter that is an args() object. This object is described further.
The main() method is also responsible for calling prompt(), which executes the
dialog, and then calling run() to perform the manipulation.
static void main(Args _args)
{
DemoRunBase demoRunBase;
demoRunBase = new DemoRunBase();
if (demoRunBase.prompt())
{
demoRunBase.run();
}
}
Property Description
LinkType The LinkType property determines how two data sources
are joined. The following list describes each option:
• Passive: The query on the joined data source is only
executed when the form is opened. A later change in the
controlling data source does not change the view.
• Delayed: The query on the joined data source is
executed every time that the controlling data source is
changed. The query execution is delayed to avoid the
fetch of data, if the controlling data source is changed
multiple times in a short time. This is the case when the
user is scrolling through data on a grid.
• Active: This option is similar to Delayed, except there is
no delay before the query is executed.
• InnerJoin: Selects records from the main table that have
matching records in the joined table and vice versa. If
the joined table does not have any records related to the
main table record, the main table record is not
displayed. Each match returns a result set of the main
table record and joined table record joined together as
one record. This is useful when wanting to display
records from both tables in a grid.
• OuterJoin: Selects records from the main table whether
they have matching records in the joined table. Each
match returns a result set of the main table record and
joined table record joined together as one record. If
there is no match, the fields from the joined table will be
empty.
• ExistsJoin: Selects a record from the main table only if
there is a matching record in the joined table. As soon as
a matching record is found, the main table record is
returned. The record in the joined table is never
retrieved.
• NotExistsJoin: Select records from the main table that
do not have a match in the joined table.
IntelliMorph
IntelliMorph is a technology that simplifies the modification of forms. For
example, IntelliMorph lets users hide and show fields. Individual users can safely
and swiftly rearrange fields to best suit their work preferences without modifying
the form through the AOT (Application Object Tree). IntelliMorph also makes it
possible to quickly redesign forms. Field labels can be modified without
disturbing field data or underlying business logic.
When the form is displayed the width of the labels are adjusted to the actual
language. Fields that are not active because of configuration or security are
removed. The formatting of date, time and numbers is performed according to the
settings in the operating system.
FormRun.Run
The run method is called immediately after the init method. The super() call
makes the form window appear on the screen and performs a database search for
the data to be displayed in the form.
Typical reasons for overriding the formRun.run() method include, activating or
de-activating some fields, setting default values for controls or modifying the
query.
You must call super() if you override formRun.run() method, and you should
place your code before the super() call.
Thanks,
Vikas Mehta.