AX2012 Service: Customize dialog layout

When using AX services with data contract, all parameters are placed one by one and there is always a “Parameters” caption on top.
20130115_000523
This would look much nicer if I can place each check box to the right of their respective string input.

The way to customize the layout is not very obvious and I’ll show one way of doing it here.

1) First of all, create a new class which extends SysOperationAutomaticUIBuilder.
20130115_000525 

2) Override the postBuild() method and get a reference for each dialog field.
20130115_000526

3) After that, add code to modify the layout. (I put them in a separate method in this example.)
20130115_000527
Things to note:
- Create a new FormBuildGroupControl (subGroup) and set it’s hierarchyParent to “General”
- After that, build the rest of the form within “subGroup”
- Place the parameters fields to your desired place by modifying their hierarchyParent property.
- The order of assigning the controls affect their order of display, play with it to figure out how it works.

End result:
20130115_000528

** The above is for interest only and comes with no warranties **

Comments