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

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

主站蜘蛛池模板: 固原市| 巴彦淖尔市| 漯河市| 农安县| 大石桥市| 九龙坡区| 邵东县| 德州市| 永年县| 耿马| 曲麻莱县| 襄樊市| 济源市| 六安市| 中超| 澄迈县| 丽江市| 吉安市| 布尔津县| 易门县| 大余县| 修文县| 石台县| 和静县| 缙云县| 攀枝花市| 木里| 延庆县| 即墨市| 盐城市| 巨野县| 三都| 军事| 五家渠市| 古交市| 白山市| 睢宁县| 铜陵市| 广丰县| 罗江县| 临武县|