How to get all object belong to a Form in D365 FO (AX)

Hi All,

Please i have a technical question, is there any way to get all objects belong to a Form.

For example: in CusTrans Form, i need all controls exist in this Form ( Buttons, menu items buttons, button groups…) like the the bellow tree node


Thanks``

You’re lucky - this is exactly what I chose as an example in my blog post about the new metadata API.

Perfect, Thanks a lot Martin, this is what i’m searching for.

How can i please test if the current control is a boutton or not, (Menu item, command button…), i’m looking to list them as the strandard Tree Node :).

Thanks.

Look at the type of the control (which class it is). My code is written to work with all types, therefore I’m using the parent type AxFormControl, but each type of control is a different class inheriting from AxFormControl and adding extra data and behavior.

You can use ‘is’ and ‘as’ operators for this purpose.