If you are building a dialog for CRM 2011 and need to have it trigger an email or create a record or do some other action (like case resolution), you should be aware that the Previous button can pose a problem.
As best practice, you want to do everything you can to put any automatic actions in your dialogs at the very end. However, sometimes you can’t get around putting the action somewhere in the middle of your process, and that’s where you can get into trouble with your users going backwards through your dialogs.
Any time during your dialog, users can hit Previous and have it go backwards a step. This will cause a problem if the following three things happen:
- The dialog did something when your user hit Next
- Your user hits Previous
- Your user hits Next again and retriggers the action that the dialog already completed.
In order to prevent this, you can use child dialogs to break your dialog into two pieces and disable the ability to go backwards from the second dialog to the first. To do this, make sure that after your action (such as Send Email or Create Record), you use the Link Child Dialog step to have your dialog call a child dialog to finish its process.
If you do this, as soon as your first dialog calls the child dialog, the user will be unable to hit the Previous button and go backwards. This means they won’t be able to retrigger the automatic action they have already fired off.
That’s it! A quick and simple tip to prevent some potential issues with dialogs in Microsoft Dynamics CRM.