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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 23.09.2012, 06:33   #1  
Blog bot is offline
Blog bot
Участник
 
24,425 / 822 (76) +++++++
Регистрация: 28.10.2006
Microsoft Dynamics CRM Team Blog: How to Execute a Workflow from a Ribbon Button and Control when the Button is Enabled
Источник: http://blogs.msdn.com/b/crm/archive/...s-enabled.aspx
==============

I just published a new technical article for developers titled Asynchronous Ribbon Enable Rules and Executing Workflows from the Ribbon with Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online.

This article describes the scenario where a ribbon control, in this case a button, can be used to execute a workflow. That by itself is not terribly difficult. There is a message called ExecuteWorkflowRequest that you can use with JavaScript and the SOAP endpoint for web resources.

However when looking at the scenarios where you might want to do this, we found that the more challenging task is controlling when the button to execute the workflow should be enabled. Especially for an action like a workflow that is executed asynchronously. You don’t want to have a UI where someone can repeatedly click a control and generate multiple workflow instances to execute. To get information about whether to enable the button or not you generally have to query data to determine if the conditions are right.

Furthermore, EnableRules for the ribbon cannot depend on (relatively) long running processes such as those to retrieve data. A long running process for an enable rule will affect the person’s experience using the ribbon controls so it is important to minimize the impact of these types of rules. The strategy described in this article is to use asynchronous requests for data and then refreshing the ribbon when the data is returned. The SDK topic Define Ribbon Enable Rules mentions this strategy in regard to custom rules, but this article provides a specific example.

I hope that this article will help you if your requirements are to execute a workflow from a ribbon control.

Cheers,

Jim Daly




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

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 8 Blog bot Dynamics CRM: Blogs 1 30.04.2016 10:26
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 10 Blog bot Dynamics CRM: Blogs 0 17.08.2012 03:27
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 7 Blog bot Dynamics CRM: Blogs 0 27.03.2012 02:11
Microsoft Dynamics CRM Team Blog: Update Rollup 5 for Microsoft Dynamics CRM 2011 Blog bot Dynamics CRM: Blogs 2 27.10.2011 17:11
emeadaxsupport: New Content for Microsoft Dynamics AX 2012 : October 2011 Blog bot DAX Blogs 0 27.10.2011 17:11
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

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

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

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 20:42.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.