Dialogs in Dynamics CRM 2011 provide a way to allow users to collect and process information using step-by-step scripts. They are typically run for one record at a time, as you see in this sample dialog: How to Set a Read-Only Field and Capture a User’s Response Using a Dialog. However, in this blog we will show you how to make CRM dialogs loop so the user can repeat the same process without having to close the dialog and start a new one.
At a high level the steps are:
- Create a dialog
- Add a step that asks the user if they would like to repeat the process
- Call the same dialog again as a child dialog
To demonstrate what this looks like, we’ll use a simple scenario where we have Education records that are associated to a Contact. A customer representative asks what education a Contact has received. Using a repeatable Dialog, a user captures all responses in one area without leaving the Contact record’s main view.
- Create a new dialog by clicking on Settings, then Processes under Process Center. Then click on the New button to create a new Dialog.
- Ensure that you select Dialog for the category and then click OK.
- The Dialog designer will now be displayed. Select the line below Steps, then click Add Steps and select Page. Enter a description, then select the line below Page. Click Add Steps and select Prompt and Response.
- Click on Set Properties. The Define Prompt and Response page will be displayed. For this example, we will capture three responses: School Name, Degree and Year.
- Click Save and Close. Click on Add Step and select Prompt and Response. Repeat for all three questions.
- Click on the Page section, which should highlight the entire section, then click Add Step and select Create Record. Select the Education record, then click Set Properties and map the responses entered. Click Save and Close.
- Click Add Step and select Page. Enter a description and then select Add Step and select Prompt and Response. Click on Set Propertiesand fill out as depicted below.
- Select the Page section for Repeat and click on the Add Step and select Check Condition. Se the condition to the following.
- Select under the Check Condition and click on Add Step and select Link Child Dialog. Note: You will notice that when selecting the lookup button to select the child dialog, it will not display this Dialog. This is because we haven’t saved the Dialog and we haven’t checked the As a child process.
- Check the As a Child Process at the top of the dialog and then click the Save button.
- Now, use the lookup button to link this Dialog. From the list select this Dialog and click OK.
You should now have the following Dialog steps.
- Once all changes are made, Activate the Dialog so it will be ready for use.
Now from the Contact record select the Dialog. After recording the three questions and creating the Education record, the Dialog will ask if you wish to repeat. If set to Yes, the Dialog will automatically repeat.
As you can see can, you can save time using Microsoft Dynamics CRM 2011 by making Dialogs repeatable. If you’d like to learn more on the topic of Dialogs, here’s a good resource on the power of Processes in Microsoft Dynamics CRM.