如何对隐藏字段进行表单自定义

时间:2019-04-06 09:30:44

标签: x++ dynamics-ax-2012

我是Ax的新手,正在对表单进行自定义。单击“显示更多字段”时,我想在表单上显示另外三个隐藏的字段(FieldC,FieldD,FieldF)。请告诉我如何实现此功能。

enter image description here

1 个答案:

答案 0 :(得分:5)

You can check an example in form VendTable > Design > MainTab > TabPageDetails > Tab > TabGeneral > HideShowGroup.

It contains two elements: a combobox (HideShowComboBox) and a button (HideShowButton).

By default, the button has following properties:

  • AutoDeclaration = Yes
  • Text = Show more fields
  • HelpText = Show/hide fields.
  • SaveRecord = No
  • Border = None
  • BackgroundColor = Dyn Background white
  • ImageLocation = EmbeddedResource
  • NormalImage = 7886
  • ButtonDisplay = Text & Image left

The button also has method clicked responsible for hiding/showing the fields that need to be hidden/displayed and for changing its own look (Text, HelpText, NormalImage = 7882, etc.)

Please note that this logic is managed in class DirPartyFormHandler - you can set breakpoints there and debug the process to understand this functionality better.