官术网_书友最值得收藏!

Creating and managing workflows

Workflows, along with the newly introduced concept of dialogs have all been grouped as Process in Dynamics CRM 2011. The workflow concept remains similar to that of previous versions, with some additional functionality.

Getting ready

We will be adding a very basic workflow to our existing solution package. Open the already created solution package to work with.

How to do it...

In order to add a new workflow using the wizard, perform the following steps:

  1. In the solution package, navigate to Processes and open the Processes view.
    How to do it...
  2. Click on New to create a new workflow.
  3. On the Process: New page, give the new workflow a name, select an entity it will work against, and from the Category drop-down, select Workflow.
    How to do it...
  4. Leave default the selection for New blank process, and click on the OK button.
  5. The process wizard starts, and it allows us to configure the workflow properties and parameters.
  6. In the Options for Automatic Processes section, I will select the scope to be Organization, and the start to be generated by the Record is created event.
    How to do it...
  7. Next, we will add a simple e-mail notification step to be executed. Click on Add Step, and select Send E-mail. This will add the Send e-mail step, and allows us to configure the properties.
  8. Click on Set Properties, and start customizing the e-mail properties. We can add the From to be the current user that creates the record, and the To field to be the owner of the record. Also, we can create a subject and body.
    How to do it...
  9. Click on Save and Close to complete the message configuration.
  10. Additionally, you can define a step description in the workflow step wizard window.
    How to do it...
  11. With our step created and configured properly, now we can save the workflow. Click on Save. In order to enable this workflow, we have to activate it. Click next on Activate.
  12. Click OK on the Process Activation Confirmation window. If there is no error in the workflow, it will become active.
    How to do it...
  13. Once the workflow is activated, we can create a new record and verify that it performs as expected.

How it works...

This sample workflow we created sends an e-mail confirmation once a new Contact record is created. As long as the workflow stays active in the system, it will execute on each record creation, as configured. Other configuration options include the capture of field value changes, new assignment of record to another user, or on record deletion. The record deletion event captured can also be used to validate record deletion, and stop the process if certain conditions are not met.

See also

主站蜘蛛池模板: 吴江市| 丰原市| 灵丘县| 承德市| 芷江| 宁明县| 乌拉特后旗| 巩留县| 晋江市| 巫山县| 治多县| 岚皋县| 新巴尔虎右旗| 门源| 凌源市| 兴化市| 凤山县| 平塘县| 乐山市| 红原县| 西宁市| 八宿县| 定结县| 贵港市| 桐梓县| 封开县| 成都市| 华蓥市| 宁明县| 青田县| 繁峙县| 调兵山市| 霞浦县| 宁国市| 珲春市| 渝中区| 敦化市| 雷山县| 内乡县| 无锡市| 井陉县|