Create or edit a workflow
This task requires the System Administrator or System Customizer security role A defined set of privileges. The security role assigned to a user determines which tasks the user can perform and which parts of the user interface the user can view. All users must be assigned at least one security role in order to access the system. or equivalent permissions. Customization tasks can be performed only while you are online. More information: Customization Permissions
- In the Navigation Pane, click Settings, and then under Process Center, click Processes.
- On the Actions toolbar, click New.
In the dialog box, set required properties for the workflow.- In the Process name box, type the name that you want to use for this workflow.
- From the Entity list, select the primary entity The entity that a related entity is associated to. Sometimes called a parent entity. that you want to use with this workflow.
- From the Category list, select Workflow.
- In the Type area, select whether you want to create a completely new process or whether you want to use a process template A type of process, either a workflow or a dialog, that serves exclusively as the basis for creating other processes. Process templates cannot start workflow jobs or dialog sessions..
If you want to view details about the process template, select the process template, and then click Properties.
- Click OK.
In the area in the top half of the Workflow form, set additional properties for the workflow.- If you plan to activate this workflow to automate your business processes, from the Activate As list, select Process.
- OR -
If you plan to activate this workflow as a template A type of workflow that serves exclusively as the basis for creating other workflows. Workflow templates cannot start workflow jobs., from the Activate As list, select Process template.
- Under Available to Run, select how you want to make the workflow available to other users People who have active user accounts in Microsoft Dynamics CRM. in your organization:
- On demand. If you want to make the workflow available as an on-demand workflow A type of workflow that only runs when a user chooses to apply it to records from a toolbar or menu in Microsoft Dynamics CRM., select this check box.
- As a child workflow. If you want to make the workflow available as a child workflow A type of workflow that runs only when started by another workflow. It is contained within a parent workflow and cannot be run on its own., select this check box.
- If you are creating an automatic workflow A type of workflow that runs as soon as the conditions defined in the workflow logic are met. No user action is required to start the workflow., under Options for Automatic Workflows, set options unique to workflows that run automatically:
- Scope. Select the access level A security role setting that determines, for a given entity, who can access records. There are four options: just the owner of the record, all users in the current business unit, all users in the current or child business unit, or all users. that matches the workflow scope The range of records that a particular workflow is allowed to take action on. The options available when you specify the scope of a workflow depend on the access level that you have on your workflow's primary entity. Workflow jobs started by your workflow will not take action on records owned at a higher access level than your access level. that you want to set for this workflow.
Note: The items available to you in this list depend on the privileges A user's rights to perform specific actions on specific record types or to perform tasks. Privileges are assigned by system administrators to security roles. Users are then assigned security roles. Examples of privileges include Update Account and Publish Customizations. that have been assigned to your security role A defined set of privileges. The security role assigned to a user determines which tasks the user can perform and which parts of the user interface the user can view. All users must be assigned at least one security role in order to access the system. for the workflow's primary entity The entity that a related entity is associated to. Sometimes called a parent entity..
- Start when. Select the check boxes that correspond to the events in your implementation of Microsoft Dynamics CRM that you want to start the workflow.
Note: If you select the Record fields change check box, you must click Select and specify the fields A property of an entity with a specific data type. Fields are analogous to columns in a database table. When they are added to an entity form, they are displayed as fields that correspond to their data type. of the primary entity The entity that a related entity is associated to. Sometimes called a parent entity. that you want the workflow to monitor for changes.
- Scope. Select the access level A security role setting that determines, for a given entity, who can access records. There are four options: just the owner of the record, all users in the current business unit, all users in the current or child business unit, or all users. that matches the workflow scope The range of records that a particular workflow is allowed to take action on. The options available when you specify the scope of a workflow depend on the access level that you have on your workflow's primary entity. Workflow jobs started by your workflow will not take action on records owned at a higher access level than your access level. that you want to set for this workflow.
- If you plan to activate this workflow to automate your business processes, from the Activate As list, select Process.
Add stages to your workflow logic.In the Workflow Logic area in the lower half of the Process form, you can add workflow stages Elements of workflow logic that group steps. Workflow rules determine the required activities for a workflow and the order in which those activities must be performed. to your workflow logic All of the conditions, actions, and other logical elements that define when and how a particular workflow takes action on Microsoft Dynamics CRM records..
- Click in the Workflow Logic area where you want to add the workflow stage.
- On the Workflow Logic toolbar, click Add Step, and then select Stage.
- Click OK.
- Click Type a stage description here and replace the default text with a description of what your workflow stage includes.
Note: If you add a stage to a workflow, then all steps must be contained within a stage. If necessary, Microsoft Dynamics CRM will organize steps that already exist into a stage when you add a new stage.
Add steps to your workflow logic.In the Workflow Logic area in the lower half of the Workflow form, you can add workflow steps Elements of workflow logic that define units of business logic within a workflow. Steps can include conditions, actions, other steps, or a combination of these elements. to your workflow logic All of the conditions, actions, and other logical elements that define when and how a particular workflow takes action on Microsoft Dynamics CRM records..
- In the Workflow Logic area, click where you want to add the workflow step.
- On the Workflow Logic toolbar, click Add Step and select one of the following items:
- Check Condition. Adds a check condition An element of workflow logic that defines a specific situation and any actions that should be taken if that situation occurs. A logical "if-then" statement in a workflow or dialog. to the workflow. You can add a check condition at any level in your workflow logic.
After you have added a check condition to your workflow, you can add one or more conditional branches and a default action to the check condition:
- Conditional Branch. Adds a conditional branch An element of workflow logic that defines an alternative condition and action or additional steps, in cases when the criteria in a condition element are not met. A logical "else-if-then" statement in a workflow. to the workflow. To add a conditional branch, you must select the If line in a check condition or the Otherwise, if line in another conditional branch.
Note that more than six levels of conditional branching are not displayed.
- Default Action. Adds a default action An element of workflow logic that defines an alternative action in all cases that do not match the criteria defined in condition or branch elements. A logical "else" statement in a workflow. to the workflow. You can include only one default action associated with a check condition. To add a default action, you must select the If line in a check condition or the Otherwise, if line in a conditional branch.
- Conditional Branch. Adds a conditional branch An element of workflow logic that defines an alternative condition and action or additional steps, in cases when the criteria in a condition element are not met. A logical "else-if-then" statement in a workflow. to the workflow. To add a conditional branch, you must select the If line in a check condition or the Otherwise, if line in another conditional branch.
- Wait Condition. Adds a wait condition An element of workflow logic that enables a workflow to pause itself until the criteria defined by the condition have been met. The workflow starts again automatically when the criteria in the wait condition have been met. to the workflow. You can add a wait condition at any level in your workflow logic.
After you have added a wait condition to your workflow, you can add one or more parallel wait branches to the wait condition:
- Parallel Wait Branch. Adds a parallel wait branch An element of workflow logic that defines an alternative wait condition with a corresponding set of additional steps that are performed only when the initial criterion is met. You can use parallel wait branches to create timeouts in your workflow logic. They help prevent the workflow from waiting indefinitely until the criteria defined in a wait condition have been met. to the workflow. To add a parallel wait branch, you must select the Wait until line in a wait condition or the Otherwise, wait until line in another parallel wait branch.
- Check Condition. Adds a check condition An element of workflow logic that defines a specific situation and any actions that should be taken if that situation occurs. A logical "if-then" statement in a workflow or dialog. to the workflow. You can add a check condition at any level in your workflow logic.
- Click condition.
- In the Specify Condition dialog box, select the condition An element of workflow logic that defines a specific situation and any actions that should be taken when that situation occurs. A logical "if-then" statement in a workflow. for the step:
Tip: After you specify one condition, move your cursor over the area to the right of the condition you just specified. New fields appear, in which you can specify additional details about the condition.
- In the first list, select a primary entity The entity that a related entity is associated to. Sometimes called a parent entity. or related entity An entity that is associated with a primary entity (record type) through a unique reference defined by using a lookup control on the related entity form. For example, an account has a unique reference to a primary contact..
- In the second list, select a field A property of an entity with a specific data type. Fields are analogous to columns in a database table. When they are added to an entity form, they are displayed as fields that correspond to their data type. in the entity you selected in the previous step.
- In the third list, select the logical operator An element of logic that affects the outcome of a logical expression. Examples of logical operators include Equals and Contains. In Microsoft Dynamics CRM, logical operators are used in Advanced Find queries, as well as in workflow conditions and dynamic values. that best fits the condition you want to specify, such as Contains or Equals.
- In the last lists or boxes, enter the values that you want to use as the criteria for your condition.
- Click Save and Close.
Tip: You can specify multiple conditions for a single process step. After you select an entity from the first column, a second line appears, where you can specify another condition. The process considers the conditions to have been met only when an event matches all of the criteria.
- On the Workflow form, click Type a step description here and replace the default text with a description of what your workflow step includes.
- Add actions to your workflow logic.
- Click Save or Save and Close.
Notes
- If you use a wait condition An element of workflow logic that enables a workflow to pause itself until the criteria defined by the condition have been met. The workflow starts again automatically when the criteria in the wait condition have been met. to wait for a timeout A type of wait condition in workflow logic that stops all actions in the workflow until a specified time. You can create a timeout by selecting the following values for the wait condition: Workflow (under Local Values), Timeout, Equals, and a date or specific time., you cannot change the timeout condition (you can change individual details for the timeout, but you cannot change the timeout to another type of condition). If you need to change the conditions, delete the timeout and add a new wait condition.
- If you need to back up workflows, or export them for use in a different implementation of Microsoft Dynamics CRM, you can export them as part of exporting customizations. More information: Export Customizations and Configurations
- You must activate a workflow to make it available to use as an automatic A type of workflow that runs as soon as the conditions defined in the workflow logic are met. No user action is required to start the workflow., on-demand A type of workflow that only runs when a user chooses to apply it to records from a toolbar or menu in Microsoft Dynamics CRM., or child workflow A type of workflow that runs only when started by another workflow. It is contained within a parent workflow and cannot be run on its own.. To activate, open the workflow, and on the Actions toolbar, click Activate.
|
Related Topics |
