Search code examples
dynamics-ax-2009ax

Assign return value to a table field


I need to insert a value to the field table and I have a display method which returns this value Is there a way to assign a return value from display method to a table field or calling this display method in insert()?

Thanks


Solution

  • From my experience, you can use display methods just as you do ordinary methods. So, to add the value of a display method as a value to a table (in the insert or initValue method) just state:

    this.[FieldName] = this.[MethodName]();
    

    If you are on a different object (IE, not a table), it may need to be accessed differently, but the concept is still the same.