Dynamics AX 2012 - CommandButton insert and edit by form

萝らか妹 提交于 2019-12-12 03:01:03

问题


I've created form that should insert, edit and delete row by usig CommandButtons. Propierity is set in Command field to New, Edit record and delete.

Generally it works, but its not safe, because it is editing rows without using CommandButton.

I don't know how to make data Source or CommandButton propierities to edit record only with button, not automatically.


回答1:


This is how standard AX 2012 forms behave, if created using form templates as described here.

To create a form with a template, right-click Forms in the AOT, click New Form from template, and then click the template that specifies the type of form you want to create. A form is generated from the specified template. The new form contains controls that implement the form structure specified by the design pattern for that form. In addition, several properties are populated with values that apply to the specified type of form. To complete the form, you add controls that provide access to the data and actions that the form supports.

Consider using the SimpleListDetails form template. The grid has AllowEdit set to No, while the details part allows editing, if in edit mode. Whether edit or view mode is the default is a user setup.




回答2:


Ok...using all properties combination there is simple way:

Just set on Menu Item "OpenMode" to "Viev" and editing is disabled utill user use right CommandButton.



来源:https://stackoverflow.com/questions/25147864/dynamics-ax-2012-commandbutton-insert-and-edit-by-form

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