Click here to Skip to main content
Click here to Skip to main content

Create a Workflow in Microsoft Dynamic CRM 4.0

, 28 Oct 2011
Rate this:
Please Sign up or sign in to vote.
Create a Workflow in Microsoft Dynamic CRM 4.0

What is Workflow?

  • It is a series of steps (methods or functions) which execute sequentially and change the direction of flow based on condition.
  • It is a tool for managing data and processes.
  • It helps to implement standardized Business Processes to help their operation run smoothly and consistently.

Workflow In MSCRM

  • It executed asynchronously.
  • "Microsoft CRM Asynchronous Processing Service" is the Windows service which helps the workflow to execute. It acts as an Host application for the workflow engine to work.
  • Since workflows execute asynchronously, they don't run immediately and depending on the server overhead, it takes some times to complete.

How to Create Workflow in MSCRM

Select the Setting option from Left side of the navigation pane in MSCRM:

Settings--------------->Workflows-------------------->New 

Initiates Workflow in MSCRM

In Microsoft Dynamic CRM, Workflow rules are initiated in three ways which are mentioned below:

  1. Manually by the user
  2. Trigger an event (automatically)
  3. From another Workflow Process (child workflow)

Description of the Above Points

Manually by the User

In this case, User runs the Workflow manually by going to the associated Entity and Clicking the "Run Workflow" button.

Step 1: Select the Setting option from the Left navigation pane in MSCRM:

Setting1.png

Step 2: Select the Workflows:

Setting2.png

Step 3: Select the "New" option, Workflow New Dialog open:

  • Enter the Workflow Name option.
  • Select the Entity option.
  • Select the Type option

CreateWF2.png

Step 4: Click Ok button. The new form will be opened.

In this case, we have to select the "On Demand" option in "Available to Run".

CreateWF3.png

Trigger an Event (Automatically)

The events that triggers the Workflow are mentioned below:

  • Record is created: When a new instance of an Entity is created.
  • Record status changes: When the entity status changed. Some examples are given below:

    Entity Status
    Accounts Active, Inactive
    Cases Active, Canceled, Resolved
    Contacts Active, Inactive
    Users Disabled, Enabled

  • Record is assigned: Assign the associated entity to the user.
  • Record attributes change: When the attribute of the entity changed.
  • Record is deleted: When the Instance of the associated entity is deleted.

From Another Workflow Process (child workflow)

In this case, we have to select the "As a Child Workflow" option in "Available to Run". Here, the Workflow runs the another Workflow.

Workflow Scope in MSCRM

  • User
  • Business Unit
  • Parent: Child Business Units
  • Organization

When We Used Workflow or Plug-ins

If you need the process to run synchronously, then go for Plug-ins and if you need process to run asynchronously, then go for Workflow.

Creating Workflow in MSCRM

Step 1: Select the Setting option from left side of the navigation pane in MSCRM.

Setting1.png

Step 2: Select the Workflows option:

Setting2.png

Step 3: Select the New option and Set the "Workflow Name","Entity" and "Type".

CreateWF2.png

Click the "Ok" button.

Step 4: Set the values as per requirement.

CreateWF3.png

Step 5: Click On "Add Step" option.

Step3.png

Select the Step as requirement. Following steps are mentioned below:

  • Stage: It is used for grouping purpose and is stored in database
  • Check Condition
  • Wait Condition: Stop the execution of Workflow for a certain period of time
  • Create record
  • Update record
  • Assign record
  • send E-Mail
  • Start Child Workflow: Execute the Child Workflow
  • Change Status
  • Stop Workflow

Step6.png

Step 6: Click Save and Close to continue.

Step 7: Publish the Workflow for activation.

Step8.png

Step 8: Click Ok.

Reference

  • Working with Microsoft Dynamic CRM 4.0 (Author:- Mike Snyder,Jim Steger)
  • Microsoft Dynamic CRM 4.0 Unleashed (Author :- Marc J. Wolenik; Damian Sinay)

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Pijush kumar Joardar
Software Developer (Senior)
India India
No Biography provided

Comments and Discussions

 
QuestionCrm workflows timeout PinmemberMember 1005986817-May-13 5:25 
GeneralMy vote of 4 PinmemberPrasyee23-Apr-13 3:08 
GeneralMy vote of 5 PinmvpKanasz Robert5-Nov-12 0:39 
GeneralMy vote of 5 Pinmemberpranab2k2-Nov-11 18:51 
GeneralMy vote of 5 PinmemberBhabeshM1-Nov-11 19:08 
GeneralMy vote of 5 Pinmemberdubey_n_c31-Oct-11 2:49 
QuestionMy Vote of 5 PinmemberRanjit Chakraborti31-Oct-11 1:45 
GeneralMy vote of 5 PinmvpAbhishek Sur29-Oct-11 5:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web03 | 2.8.140721.1 | Last Updated 28 Oct 2011
Article Copyright 2011 by Pijush kumar Joardar
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid