- Microsoft Dynamics CRM 2011 Scripting Cookbook
- Nicolae Tarla
- 340字
- 2021-07-27 18:12:41
Starting a workflow from a dialog
We have looked at workflows and dialogs. But they can function together to achieve a result. For example, we can start from a dialog, capture specific information, and then kick off a workflow as part of the same process to process the information and generate a result.
Getting ready
Using the same solution package, we will be creating two new processes. One is a workflow that sends an e-mail when a field value changes, which we will mark as a child process. The other is a dialog that will call this workflow.
How to do it...
Create the child workflow by performing the following steps:
- Create a new workflow, on the Account entity this time. Mark it to run as a child process.
- Add a send e-mail step to the workflow, and configure the email properties as described in a previous recipe.
- Activate the workflow.
Create the parent dialog that will kick-of this workflow by performing the following steps:
- Create the parent dialog on the same entity, as a dialog.
- Create a new page, then a question with a Yes/No option set. Create a new check condition step, in which if the value selected in the dialog is Yes, then create a Start Child Workflow step. Look up the child workflow we created earlier and select it.
- Save and activate this dialog.
How it works...
The dialog we have created, as simple as it is, prompts the user to decide whether they want to run a workflow or not. When the user selects Yes, the workflow is started.
We can easily test this functionality by going to a new account, and selecting from the ribbon the Start Dialog button. A window prompts us to select the dialog we will run.
We can easily check the execution status of both the dialog and the workflow by navigating on the account to the Processes section.
These two views will give us details about the processes that run against the current account, and the status of each.
- Mastering Microsoft Forefront UAG 2010 Customization
- 中國新股民必讀手冊(cè)(2015年最新版)
- 金融科技(FinTech)發(fā)展的國際經(jīng)驗(yàn)和中國政策取向(中國金融四十人論壇書系)
- 國有企業(yè)經(jīng)濟(jì)責(zé)任審計(jì)實(shí)務(wù)指南
- Citrix? XenMobile? Mobile Device Management
- 審計(jì)綜合模擬實(shí)訓(xùn)
- 會(huì)計(jì)信息化基礎(chǔ)(金蝶版)
- Big Data Visualization
- Securing Hadoop
- 審計(jì)基礎(chǔ)
- 《企業(yè)內(nèi)部控制基本規(guī)范》合規(guī)實(shí)務(wù)指南
- Tableau:Creating Interactive Data Visualizations
- 行政單位經(jīng)濟(jì)責(zé)任審計(jì)實(shí)務(wù)指南
- 公司內(nèi)部審計(jì)
- 傳習(xí)集2