Search code examples
x++dynamics-ax-2012

How to do Form Customization for Unhiding Fields


I am new to Ax,I am doing an customization on form.When I click on show more fields I want to show three more fields on form which are hiding(FieldC,FieldD,FieldF).Please tell me how to achieve this Functionality.

enter image description here


Solution

  • 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.