AXForum  
Вернуться   AXForum > Microsoft Dynamics CRM > Dynamics CRM: Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 11.02.2011, 00:15   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
Microsoft Dynamics CRM Team Blog: Authoring Recursive Dialogs
Источник: http://blogs.msdn.com/b/crm/archive/...e-dialogs.aspx
==============

The Dialog feature does not provide loop structure so you cannot do the same action or set of actions in a loop however there is a way to form a virtual loop for performing a set of actions. The way is to use a controlled recursive child Dialog having the desired set of actions being called from a parent Dialog. Here is the trick to do that.

The following hypothetical example will show you how to make Dialog calls recursive. Let us assume that we want to create a Dialog for Customer Service Executive who is creating a Case for her customer. What if she wants to create multiple cases in one call while not starting Dialog again and again and asking the similar set of questions for creating a Case. Here is the step by step method to achieve this. Once acquainted with the trick you can use the recursion for many other scenarios. One such scenario can be creating multiple Contract Lines for a Contract using Dialog Process in Microsoft Dynamics CRM 2011.

1. Create a child Dialog named “create case” for Account entity which ask the relevant things required to create a case. In the example below only Case’s Title is asked in prompt. You can ask for other attributes too by adding as many Add Prompt and Responses steps.



2. Now activate the Dialog and then deactivate without any change. Doing this will make your child Dialog available to be added as its own child, means now recursion is possible for the Dialogs.

3. To control the flow from entering into the infinite loop you can add a Prompt to ask if the customer wants to create another Case. If customer’s choice is yes then add a Link Child Dialog step. In the child Dialog lookup, you would be able to see the same “create case” dialog on which you are currently working. Select this as a child of its own and you got the way to make recursive call to Child Dialogs.



4. Add exit method to get out of recursion using Default Action step thorugh a Page showing Thanks to Customer for registering the Case. The final Dialog will look like below figure



5. Now you are ready to use this recursive Dialog from another Parent Dialog, but before that do not forget to activate this just created Child Dialog. The parent Dialog will look something like below figure.



So you have created a recursive Dialog. Let us test it by running it. Go to Account grid and run this Dialog for any Account record by clicking Start Dialg ribbon button in context to any Account record.



When you run the Dialog, the answer choice on page above of run Dialog will determine whether to recurs or exit.

In above example we saw the way to create recursion and way to exit from recursive loop. Hope this will help you to explore the power of recursive Dialogs in many ways to solve your practical scenarios.

Cheers

Ramesh Pandey







Источник: http://blogs.msdn.com/b/crm/archive/...e-dialogs.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Microsoft Dynamics CRM Team Blog: Driving Success with the New Microsoft Dynamics Marketplace! Blog bot Dynamics CRM: Blogs 0 28.01.2011 00:12
Microsoft Dynamics CRM Team Blog: CRM Online: Reporting Options Blog bot Dynamics CRM: Blogs 0 18.06.2009 06:14
Microsoft Dynamics CRM Team Blog: The First ' Microsoft Dynamics CRM Incubation Week' Blog bot Dynamics CRM: Blogs 0 07.01.2009 03:05
Microsoft Dynamics CRM Team Blog: Rolling out CRM: Who should take ownership? Blog bot Dynamics CRM: Blogs 0 25.11.2008 02:08
Microsoft Dynamics CRM Team Blog: Highlight: Available downloads for Microsoft Dynamics CRM Blog bot Dynamics CRM: Blogs 0 05.11.2008 22:05

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 03:40.