Sunday, April 12, 2020

Display Methods in Ax 2012

Add the field(Int this case int type) in the form that you want to show(Total in this case) or do the operations on  (display method is used to show the name with id also)

Put the following properties of the field that you added in the Form
datasource   : whatever you want to add
datamethod : name of the method that you will create

now go to the table and create a method (display method is made on table methods)

display public TTC_Dis AmountOrder()
    TTC_OrderTable orderTable;

    select sum(Dis) from orderTable;

    return orderTable.Dis;