Sunday, October 16, 2011

Axapta, create an EDT for allow particular data display in drop down list

When the table contain the list of data that can divide in to few groups as below




but we only wish to select a particular group of data (example Zone) to display in drop down list in form.
Hence we create an EDT to help us for the filtering job.



Steps


1. Create a EDT, and set a normal relationship for it



2. Set the relationship as below :-


3. Create a related field fixed relationship :- 


4. Set the relationship as based on the enum value in Base Enum :-


5. Done. =)








Wednesday, October 12, 2011

Axapta Display method for select row in Grid

I facing an issue when I assign display value to Grid. It's will only give me the current select grid record instead of particular row record as below :- 








 since I need the exactly related record, not the currently select grid record. therefore I need to set parameter on the Display method to allow the system know which row of record I refer.


Step by Step


1. Create a Display method on the child table which will display records in detail grid :-






2. Write the code below to the method:-






3. Create a new Control to the detail grid. 








4. Right click the Control and select properties. Set AllowEdit = No, DataSource = Child Table (which contain the display method) and DataMethod = Display Method that created just now 






5. Done. =)



Tuesday, October 11, 2011

AX Form containing 2 Grids with related data

The post is to show the result as below :-
When the user select Warehouse in header grid, the detail grid will refresh and get all data based on the selection.

  Steps

1. Add the relationship on the child table which will appear in detail grid :-
2. Create a Form and add the parent table and child table as Data Source :-
3. Right click child table and select properties, then insert the CounterField as the field to link with parent table and insert parent table at JoinSource.
4. Drag and Drop the parent table's fields from DataSource to Header Grid and child table's fields to Detail Grid
5. Remember set the DataSource of the Header Grid to Parent table and Detail Grid's DataSource to Child table
6. Compile the Form then you will get the expected result as shown.