Powered By Blogger

Thursday, June 24, 2010

How to open a form in workspace in DAX2009 like in AX 4.0

ALL,

You all might be aware that all forms in Ax2009 are behaving like an independent application forms and used to open in a separate window which becomes a bit cumbersome 2 handle.

While doing some work over it, i found something not to go with this and restrict DAX to open the forms in workspace rather in a separate window as a workaround (though it's an intentional design in product).

There are two ways to handle it..
1. Just put the below code to the 'SysSetupFormRun' class b4 super() call.

this.form().design().windowType(FormWindowType::Workspace);
super();

2. Change the formdesign property windowtype from standard to workspace. This has to be done for all the forms user wanted 'not 2 open' in a separate window.

Enjoy same feel 2 work in DAx2009.

Cheers DaXing.......

Friday, June 18, 2010

Workfow being submitted multiple times by clicking submit button

During working with workflow i have seen this issue in standard Ax.
Click on submit on your main form, wait for the comments dialog to appear, change focus back to your main form again and click on submit again.

Now click the ok/submit button on your two comments dialogs and unless you have added some extra checking down the line, your record will be submitted into workflow twice, be assigned twice, approved twice (if the approver doesn’t catch on) -:)......seems to be horrible for me , even faced the same issue in standard Ax Purcahse requisition workflow. ...see below screen




Found two ways to handle this as below---

1. Put an additional check after your your .dialogOk() call and before your activateFromWorkflowTemplate() to see if the record has been submitted.

2. Go to form 'WorkflowSubmitDialog' Form and add below code to 'wait' method.

public void wait(boolean _modal=false)
{
// super(_modal);
//Comment this standard overriden line and call super
super(true);
}


But still i think issue need to be fixed in standard Ax as it doesn't make sense to submit the workflow multiple times...