Contact Me

Total Pageviews

Saturday 2 August 2014

Passing Parameters between Forms in Axapta

" The Args class is used to pass arguments such as a name,a caller and parameters between Application Objects".

Caller

Gets or sets the instance of the object that created this instance of the Args class.  
name

Gets and sets the name of the application object to call.
parm

Gets or sets a string that specifies miscellaneous information for the called object.  
parmEnum
Gets or sets the enumeration value of the enumeration type that is specified in the parmEnumType method.  
parmEnmType

Gets or sets the ID value of any enumeration type. 
ParmObject

Gets or sets an instance of any object to pass to the called object.

record

Gets and sets the record from the table on which the caller object is working.

1) Create two Forms named FormA and FormB
2)Use the EmplTable as the Datasource of both forms
3)Design FormA with one Grid and add 4 data fields to the Grid(EmplId,DEL_Name,Grade,EmplStatus…..)
4)Assign the datasource for the grid and the data fields
5)Add a Button in FormA
6)Override the Clicked() method and write the below code:


7) Open the Second Form – FormB
8) Add one Grid Control and set the Data Source is EmplTable
9) Add 4 data fields as same in the Form A
10)Now Override the Init() of Form

11)Override the Init() of the DataSource



12) Save it, and create two menu items for each.
13) It is important to change the runon property of the FormB as CalledFrom.
14)Run the FormA and select an Employee Record and click the button.
15)The FormB opens with the Related information of the Selected Employee on form.

No comments:

Post a Comment