Search code examples
axaptadynamics-ax-2009x++

How to make dialog elments collapsible?


Is there any way to make DialogGroup elements collapsible through X++?

I've been looking at MSDN and going through the class but I don't seem to find something that would be useful.

Another developer has added two groups to the dialog that is displayed when creating a payment proposal (CustVendPaymJournal_Vend Class) and the "Ok" and "Cancel" buttons are no longer displayed on smaller resolutions (1024x768).

My approach is to make some of the groups collapsible to enable the dialog to display such buttons.


Solution

  • I found it.

    After looking at the MSDN for quite longer than I would have wanted to, I found the solution:

    Once the DialogGroup is created dialogGroupProposalType = dialog.addGroup("@SYS88520");

    There is a method called frameOptionButton() available, which receives a FormFrameOptionButton ennumeration value as parameter.

    dialogGroupProposalType.frameOptionButton(FormFrameOptionButton::Hide);

    http://msdn.microsoft.com/en-us/library/aa845161(v=ax.50).aspx#F

    http://msdn.microsoft.com/en-us/library/aa627673(v=ax.50).aspx

    http://msdn.microsoft.com/en-us/library/aa627673(v=ax.50).aspx

    http://msdn.microsoft.com/en-us/library/aa592526(v=ax.50).aspx