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...
Using wait method:
ReplyDeleteThe most common use for this method is to start an object that asks the user for some input and then call the wait method on that object (for example, a form). The next line of code is not executed until the object has called a notify or notifyAll method.
When the wait method is called from a form, you do not have to call the notify methods manually because forms call the Object.notifyAll method when the user either closes the form or presses Apply.
How to hide that dialog from Enterprise Portal.
ReplyDelete