Tip #174: Replace standard system dialogs

Dynamics CRM includes some system dialogs that are very useful, but cannot be customized. Some of these include close opportunity, resolve case, and others.

Let’s say that you want to use the close opportunity button, but you don’t want to record revenue using the actual revenue field. Having users use the standard opportunity close dialogs may confuse users, as they are forced to populate a value for actual revenue.

While these dialogs cannot be customized, one way to achieve a customized dialog is by hiding the system button and adding a custom button that calls a custom dialog process.

First, create a dialog that mimics the behavior and constraints of the system dialog. For example, in the case of the close opportunity dialog, the opportunity cannot be closed if there are any open quotes related to the opportunity. Fortunately, the dialog “query CRM” function allows me to query CRM and see if there are any open quotes related to the opportunity, and if there are, display a message and stop the dialog.

dialog1

The really great thing is this gem of a feature in dialogs enables us to add additional constraints. Say I don’t want to allow opportunities to be closed unless there are related opportunity products. I could easily add additional constraints.

Bonus tip: To create a notification in a dialog, add a page and add a prompt, but choose “None” for Response Type. This will display the message to the user without asking them to type a response. Basically a label with no field.

Next, add the page for your close dialog form,  and add prompts for the fields that you want to appear on the dialog form.

Then, add an update record step to update the opportunity using the values specified in the dialog, then a step to change record status to the appropriate status.

Once your dialog is complete and published, use the Ribbon Workbench to hide the standard system button.

Finally, follow these instructions to add a custom button to call your new close dialog.

Notes and disclaimers:

  • The custom dialog will work in all user interfaces except for the CRM for tablets app.
  • The standard opportunity close process also creates an opportunity close activity during the close process. In many cases, users don’t actually see or use these activities, so my simplified close dialog simply closes the opportunity. If you use opportunity close activities, you will want to modify the above process.
  • One challenge is mapping a custom status reason option set in the custom dialog to the change status step. So to mimic the standard behavior of users selecting the reason won or reason lost during the dialog, I created a custom status reason picklist and use a series of branched check condition steps to close with the selected status reason. This is somewhat tedious, especially if you have many status reasons. If anyone knows of a way to map a dialog picklist to a status change step, we will feature your tip prominently on the best CRM tip blog on the internet.
Share on FacebookTweet about this on TwitterShare on Google+

4 thoughts on “Tip #174: Replace standard system dialogs

  1. Una Clancy says:

    Has anybody tried to populate the competitor field on a close as lost opportunity Dialog.

    • Built-in dialogs are out of reach, at least using supported customizations. You can try playing with parameters and/or query strings but, ultimately, it’ll be unsupported. Replacing the dialog with the custom one is the only reliable approach.

      • Una Clancy says:

        Thanks George,

        I think my question was not very clear, my apologies, i have created a dialog on opportunity entity and i want to reference the competitor lookup so they can select the competitor they lost to. I have commenced the dialog to have an option set of there big list of lost reasons and now i want to add the competitor lookup which it doesn’t allow me.

        I note you cannot have a dialog on the close opportunity entity so I am not sure how to address the competitor issue.

        thanks
        Una

  2. Kari Hiatt-Moran says:

    I have a custom dialog box, but I’m having issues searching and reporting on the competitor look-up as well as the notes field that exists on the dialog. Any suggestions?

    Thanks,
    Kari

Leave a Reply

Your email address will not be published. Required fields are marked *