Processes in Microsoft CRM 2011

In Microsoft CRM 2011, the workflow is called the process, and it supports Windows Workflow Foundation. A process is a way to implement business logic using the OOB process designer tool. In Microsoft CRM 2011, we have two categories:

  • Dialog
  • Workflow

Dialogs

Microsoft CRM 2011 has introduced a new interactive process called Dialogs, where we can take input from users and provide results based on the input value. Dialogs works in a synchronous manner. We have the following two options to run dialogs:

  • As an on-demand process: This option is used when we want to start the process manually on the selected record, using the Start Dialog button in the ribbon toolbar.
    Dialogs
  • As a child process: This option is used when we want to start a process from another process. You can't start a child process directly.

Input arguments and variables

Input arguments are used to pass information from a parent dialog to a child dialog. You can only use input arguments with child dialogs. Thus, we can't add input arguments in a dialog that is configured to run as on-demand.

Variables are used to hold temporary value during dialog lifetime.

Steps

Like workflows, dialogs also contain steps that we can use to design the dialog process. Refer to the following screenshot:

Steps

We have the following steps available in the Dialog Designer as shown in the preceding screenshot:

  • Stage: This step is used to group steps
  • Page: This step is the interface that is presented to the user
  • Prompt and Response: Prompts are the questions that are presented to the user, and responses are where answers to those questions are captured
  • Check Condition: This step is used to check the condition before running the next step
  • Conditional Branch: This step is used to branch multiple conditions together
  • Default Action: This step is used to specify the otherwise action
  • Query CRM Data: This step is used to query Microsoft CRM's existing data
  • Assign Value: This step is used to assign a value to the input argument or variables
  • Create Record: This step is used to create an entity record
  • Update Record: This step is used to update an existing record
  • Assign Record: This step is used to change the owner of an entity record
  • Send E-mail: This step is used to send an e-mail
  • Start Child Workflow: This step is used to used to initiate a child workflow
  • Link Child Dialog: This step is used to used to link child dialog with current dialog
  • Change Status: This step is used to change the status of a record
  • Stop Dialog: This step is used to stop the dialog

Let's create a dialog to get salary information from the candidate. Use the following instructions to create this dialog:

  1. Navigate to Configuration | Process Center | Process.
  2. Click on New to create new dialog.
  3. Fill the following information:
    • Process Name: Get Candidate Information
    • Entity: Candidate
    • Category: Dialog
    • Type: New Blank Process
  4. Elect to run the process as an on-demand process.
  5. Add a new Stage step from the Add Step list and label it with Get Information From User.
  6. Highlight the Stage step and select the Page step from the Add Step list.
  7. Enter Page to Get user Information in the Page Label field.
  8. Highlight the Page step and select the Prompt and Response option from Add Step list.
  9. Enter Get Current CTC in the Prompt and Response label and click on Set Properties.
  10. Enter May I know your Current CTC and add values for Salutation and First Name from Candidate entity using Dynamic Values section under Form Assistant.
  11. Select Single Line for Response Type.
  12. Select Float for Data Type.
  13. Click on Save and Close.

The following screenshot is of a Prompt and Response dialog:

Steps

We need to create a prompt for our dialog variable, so we create the Prompt and Response dialog using the following steps:

  1. To get the expected CTC, we set the following variables:
    • Statement Label: Get Expected CTC
    • Prompt Text: What is your Expected CTC
    • Response Type: Single Line
    • Data Type:Float
  2. To check whether relocation is required or not:
    • Statement Label: Relocation Required
    • Prompt Text:Do you need Relocation
    • Response Type: Optionset (picklist)
    • Data Type: Integer
    • Provide Values: Define values
    • Add two values:
      • Label: Yes , Value: 100,000,000
      • Label: No , Value: 100,000,001

        Tip

        As we need to use these values to update the candidate entity record, the value of the Optionset item should match the values of Optionset in the condition entity for that attribute.

  3. To get the notice period:
    • Statement Label: Notice Period
    • Prompt Text: What is your notice period
    • Response Type: Single Line
    • Data Type: Text

After setting all variables for Prompt and Response, our stage should look like the following screenshot:

Steps

Now that we have collected all variable information, let's create steps to update the candidate entity record. Use the following steps to create an updated candidate record:

  1. Add a new stage using Add Step.
  2. Enter Update Candidate record with variable values in Stage label field.
  3. Select the Stage step and add the Update step option from the Add Step list.
  4. Click on Set Properties.
  5. Select the Current CTC field and select Get Current CTC from the Look for dropdown.
  6. Click on the Add button and on OK to set response text in the Current CTC field.
  7. Follow the preceding steps to set all variable values in their respective fields.

    After setting variable response text for the fields, the Current Salary Information section should look like the following screenshot:

    Steps
  8. Add the Change Status step from Add Step.
  9. Set Status to Contacted.
  10. Activate dialog using the Activity button from the toolbar.

Now that our dialog is ready, we need to activate it; click on Activate on the dialog toolbar.

Workflows

Workflows enable you to automate the business process. We can run workflows for multiple entities or a specific entity. OOB Workflow Designer provides us with the functionality to apply different checks before executing any sequence. We can initiate a workflow using different options; it could be an on-demand workflow that we can start manually or we can set a workflow to run automatically based on a specific action. We can also use the workflow as a child workflow of another workflow.

Tip

You can also execute workflows through JavaScript and server-side code.

Execution of workflows is dependent on an asynchronous service; this service is used by Microsoft CRM to execute long-running operations. So, we need to make sure this service is up and running if we are going to implement workflows.

To start a workflow, we can make any one of the following selections:

Workflows

We can configure workflows to start when:

  • Record is created: This option is used to run workflows when a new record is created
  • Record status changes: This option is used to run workflows when the record state changes, for example, when a record is activated or deactivated
  • Record is assigned: This option is used when the owner of the record is changed
  • Record fields change: This option is used when the value of the selected fields is changed
  • Record is deleted: This option is used when the record is deleted
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.107.210