Me and some of my colleagues are currently working with a customer on a Ax 2009 SP1 RU4. The other day we came to the conclusion that the modified methods on fields in a form suddenly disappeared. I know, you should write as less as possible code on a form, but sometimes there is no way around this.
After some research we found a reproduction how these methods suddenly disappeared:
- Go tot the AOT and chose a form
- Open the [FORM] -> Data Sources -> [TABLE] -> Fields -> [A FIELD] -node
- Add a method (for example the modified-method)
- Save your form
- Go to the properties of the table in the datasource
- Place your cursor in the table property (properties window)
- Push ENTER
The result is that the table will be reloaded in the form and all methods you created on the fields will be gone. So here you have another reason why you shouldn’t write lots of code on your forms. You can only lose it by accident.