What is the right way to access buttons in list page form?

时光总嘲笑我的痴心妄想 提交于 2019-12-11 13:34:38

问题


In ax 2012 in form with template "list page" you normally cannot access the clicked method on the button. You are just not allowed to overwrite method `clicked

You can change this behavior by setting the button property "DisplayTarget" to the value "Client". Than you can change the code of clicked method. But it does not feel right.

Is there any way how to access clicked method better way? For example by using *FormName*ListPageInteraction which is linked in form properties?

P.S.: I know you can make menu item (action) -> and call some class. But when you do not want to open new form in new window (by using menu item [display]), but you want to change something on current form it feels even worse than overwriting clicked method.


回答1:


Setting the DisplayTarget property to the value "Client" will hide the button if used from Enterprise Portal. If you not plan to use the list page in EP then go ahead.

Otherwise you will have to put your code in the target form initor class main method.



来源:https://stackoverflow.com/questions/22606114/what-is-the-right-way-to-access-buttons-in-list-page-form

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!