Monday, 18 April 2016

How to use Display Method in AX

Sometimes developer has requirement to show data on selecting some record. This can be achieved using display method. It saves memory space as we don't need to insert record in another tables to use data. Here I'm giving an simple example on how to use display method in axapta.


  • Crate two tables TableA and TableB
  • Create two fields in TableA Id and Name.
  • Create a field in TableB Id.
  • Now create a relation as shown below.

  • Create a display method getNameMethod and write following code.

  • Now create a Form to test display method
  • Add TableB in Data Source of form
  • Drag Id field to design and create new string field Name and change property.
  • Make DataSource as TableB and DataMethod as getNameMethod.

  • Insert some dummy records in Table.

  • Now open form and select any record.

  • Here name is coming automatically using display method.

  • Similarly, you can also try with some standard table.
Note : In example Axapta 4.0 version (2006) is used.

1 comment: