The form consists of to synchronized grids, and the user wanted an "Export to Excel" command button, so the active grid can be exported to Excel.
Normally this is very simple as you just need to add a command button to the form in the ActionPane somewhere and you're home free.
Not this time. It didn't work.
I googled and found this:
and put a breakpoint in the performPushAndFormatting method.
I didn't reach my breakpoint and Excel didn't even start.
Then I started to investigate the form.
Maybe the tables of the datasources of the form had some obscure property that needed tweaking, but no.
After pondering this for a while I found that the designer of the form had dropped a field group containing all the fields in the grid. Could that be the problem ?
Clearing the "DataGroup" property of the field group, allowed for dragging all the fields from the field group to the Grid node in the design, and presto, the Export button now worked like a charm.
Lesson learned. If you have a grid in your form, and you want to be able to use an "Export to Excel" command button, using field groups in the grid is a bad idea.
I experienced this on a Dynamics AX 2012 R2.