AX2009 Loop through all the controls in the form on init
How is it possible to loop through all the controls in a form when a form is initialized? I have tried the following in the init and run methods, but it does not work: for( i = 1 ; i <= element.form().design().controlCount() ; i++ ) { control = element.form().design().controlNum(i); switch ( control.handle() ) { case classnum(FormBuildButtonControl): element.initButton(control); break; case classnum(FormBuildStaticTextControl): element.initStaticText(control); break; } } Is there any way of doing this? The code you have works, but it only iterates through the top level of the design. You need