Method
|
Description
|
init
|
Initializes the report and its objects. This is the earliest
method that can be overridden among those executed when a report is
constructed and run.
Override this method to add initialization tasks, such as the
following:
·
Validation of the
argument objects received
·
Initialization of
supporting classes
·
Dynamic changes to the
design
If your changes require access to the objects of the report,
add your code after the super() call.
Caution
Do not
delete the super() call from this method. The super() call initializes all the objects of the report.
|
run
|
Runs
the report. This method is executed when the user clicks OK on
the preliminary specification dialog box of the report (which enables the
user to select where to send the report, and so on).
The
default version of this method does the following in the sequence shown:
1. Calls prompt.
2. Creates a basic design if it does not already exist.
3. Arranges the fields.
4. Calls fetch.
5. Calls print.
|
prompt
|
Prompts the user to select a print medium and other
information.
Available mediums include paper, the screen, a print archive,
.rtf, HTML, ASCII, .pdf, and text (UTF-8).
To disable the print medium selection, override the method,
and then remove the call to super().
Caution
Do not
mistake this method for the method of the same name on a query.
|
fetch
|
Fetches
records from the database. The fetch method instantiates a query, opens the
query prompt, and then fetches the records.
During
the execution of the fetch method, the next and get methods are executed in pairs on the query of the report. The send, the headerand/or footer methods, and the progressInfo method are then executed.
The cycle continues with calls to next, get, and so on, until all the data has been fetched.
The
following are reasons for overriding the fetch method:
·
The report is not based
on a query.
·
Some of the fetched data
must be processed (this can also be done on the send method).
·
The report is based on a
temporary table.
For
more information, see How to: Override the fetch Method to Filter Data for
Reports (MorphX Reporting Tools).
|
print
|
Prints the report to the selected print medium, such as a
printer, file, or screen.
|
The purpose of this blog is for knowledge sharing and connect the relevant audience who are all into Microsoft Dynamics world.
Alfasith AX
Saturday, July 13, 2013
Report Method Sequence (Methods in reports) in Dynamic AX
Method Sequences in Dynamic AX
Event Method Sequences in Form Scenarios
User actions on
a form are input through mouse pointers and keyboards. These actions cause
events that are recognized by Microsoft Dynamics AX. The recognized events
include the following:
• Opening a form
• Leaving a control
• Leaving a record
• Deleting a record
• Creating a record
The system
reacts to each event by executing several event methods. The user is often
unaware that these methods are being executed.
Event Method Sequences when a Form is
Opened
An event method
sequence is executed when a form is opened. The specific sequence depends on
the set of controls and data sources that are associated with the form.
Open a Form
________________________________________
In this example,
the user opens a form that contains a grid control, which is bound to a data
source.
The executed
events are distributed across two threads. The timing of event method execution
between threads can vary.
The following
table shows the sequence that event methods are executed in when a user opens a
form.
Method Where
new Form
init Form
loadUserSetting Form
run Form
init Data source
executeQuery Data source
leaveRecord Data source
leave Data source
leaveRecord Data source
firstField Form
firstField Form
Event Method Sequences when a Form is
Closed
Most forms in
Microsoft Dynamics AX are closed when a user clicks the Close button (the
standard button in the upper-right corner of most windows). Some forms can be
closed by clicking either an OK or a Cancel button. When the form is closed,
event methods are executed.
Close the Form by Using the Cancel Button
________________________________________
When a user
closes a form by clicking the Cancel button, event methods are executed in the
following sequence:
1. closeCancel on the form.
2. canClose on the form.
3. close on the form.
Event Method Sequences when the Value of
a Control Changes
Event methods
are executed when the value of a control changes. The exact sequence of event
methods varies for different controls.
Check Box Scenario
________________________________________
The example
scenario uses a simple form that has a check box control. The check box is
bound to a field in a data source.
A check box is a
control that has a value property. In contrast, a grid control contains fields
that each display a value, but the grid itself does not have avalue property.
Click to Change the Value in a Check Box
The following
sequence of event methods is executed when the check box is either selected or
cleared by a user.
1. validate on the check box.
2. modified on the check box.
3. validateField on the table.
Remove Focus from a Check Box
The following
event method is the only one executed when focus is removed from the check box:
• leave on the check box.
Event Method Sequences when Focus is Removed
from a Record
An event method
sequence is executed when focus is removed from a record. The sequence includes
the leaveRecord method. Form controls that simultaneously display multiple
records have the leaveRecord event method.
Grid Scenario
________________________________________
This scenario
has a form that contains a grid control, which is bound to a data source. The
form is open, and the grid is populated with data. Focus is on the first line
of the grid.
Move Focus from one Record to Another
Without changing
any data, the user clicks a different grid line to move focus to that line. The
following event method sequence is executed when data in the first line is
unchanged.
1. leave on the data source.
2. leaveRecord on the data source.
A longer event
method sequence occurs when grid line data changes before focus is moved from
that grid line.
1. modifiedField on the table.
2. update on the table.
3. aosValidateUpdate on the table.
4. leaveRecord on the data source.
5. leave on the data source.
6. leaveRecord on the data source.
Event Method Sequences when a Record is
Deleted
An event method
sequence is executed when a record is deleted from a grid control. The grid
control is on a form.
Grid Scenario
________________________________________
This scenario
has a form that contains a grid control, which is bound to a data source. The
data source is associated with a table. The form is open and the grid is
populated. Focus is on the first line of the grid.
The user presses
ALT+F9 to delete the record, and then clicks Yes to confirm. The following
event methods are executed in response to that event.
1. validateDelete on the table.
2. delete on the table.
3. aosValidateDelete on the table.
4. leaveRecord on the data source.
Event Method Sequences when a Record is
Created
Event methods
are executed when a form is used to create a new record. The details can vary,
depending on the type of controls present on the form.
Grid Scenario
________________________________________
In this
scenario, a form contains one grid control. A data source is bound to the grid
control. The data source is associated with two fields from a table.
A user opens the
form, and then the grid is populated with data. The first line in the grid has
focus.
A User Creates a
Record
A user enters a
new record by using a grid control on a form. They begin by pressing the
shortcut keys CTRL+N. This creates a new, empty line in the grid and gives
focus to the new line. The following list shows the sequence of event method
executions that occurs when the user continues with the steps needed to create
a record in the database.
1. leaveRecord on the data source.
The user enters
data into the first empty cell, and then presses TAB.
2. validateField on the table.
3. modifiedField on the table.
The user now
enters data into the second empty cell. They click a grid line that is already
populated to take focus from the new line.
4. validateField on the table.
5. modifiedField on the table.
6. validateWrite on the table.
7. insert on the table.
8. aosValidateInsert on the table.
9. leaveRecord on the data source.
10. leave on the data source.
11. leaveRecord on the data source.
Form Method calling Sequence in Dynamics AX
This gives the
information of method calls in the form level while
1. Opening the Form.
2. Creating/Updating/Deleting the record
in the Form.
3. Closing the Form.
Sequence of Methods calls while opening the Form
Form — init ()
Form —
Datasource — init ()
Form — run
()
Form —
Datasource — execute Query ()
Form —
Datasource — active ()
Sequence of Methods calls while closing the Form
Form — canClose
()
Form — close ()
Sequence of Methods calls while creating the record in the
Form
Form —
Datasource — create ()
Form —
Datasource — initValue ()
Table —
initValue ()
Form —
Datasource — active ()
Sequence of Method calls while saving the record in the Form
Form —
Datasource — ValidateWrite ()
Table —
ValidateWrite ()
Form —
Datasource — write ()
Table — insert
()
Sequence of Method calls while deleting the record in the
Form
Form —
Datasource — validatedelete ()
Table —
validatedelete ()
Table — delete
()
Form —
Datasource — active ()
Sequence of Methods calls while modifying
the fields in the Form
Table —
validateField ()
Table —
modifiedField ()
This below link takes you to details sequence as well how to implement / call that method.
http://www.slideshare.net/HamdaouiAmine/microsoft-dynamics-ax2012-forms-and-tables-methods-call-sequences-30159669
Regards,
This below link takes you to details sequence as well how to implement / call that method.
http://www.slideshare.net/HamdaouiAmine/microsoft-dynamics-ax2012-forms-and-tables-methods-call-sequences-30159669
Regards,
Subscribe to:
Posts (Atom)
SQL code to upate one Legal entity banner to all the legal entity in D365
Hi, update companyimage set companyimage.Image = companyimageA.Image from ( select Image from companyimage where dataAreaid = 'USF...
-
Hi, AccountingDistribution ( accounting distribution 7452 ) AccountingDistributionEventTmp ( accounting distribution 100001 ) Accountin...
-
Hi, Create a EDT name it Gender then in properties enumType : //select the enum name Use the below code and enjoy. static v...