Microsoft Dynamics CRM 2011

Microsoft Dynamics CRM 2011

Wednesday, September 18, 2013

How to create an On Demand Workflow in Dynamics CRM

by Carmel Schvartzman
  1. In this walkthrough we will learn Step-By-Step how to create an On Demand Workflow in Dynamics CRM 2011. A Workflow is a custom process which runs in the application background and whose aim is to automatize bussiness and processes tasks , and is built on successive steps. After its creation, a Workflow can be triggered by entities creation, assignament or deletion, by changes on the entity, and even can be called on demand. For Example, we can use a Workflow to make a Letter each time the user wants to issue one. This is the created Letter, built by the OnDemand Workflow, and appended to an Account:

    How to create an On Demand Workflow in Dynamics CRM
  2. To create the new Workflow, go to Customize the System, and then to Processes:
  3. Click on the New button:

  4. Next, type a relevant Process Name and select the Entity you want the Workflow apply to:

    In our case, the Entity is Account.
  5. Next, select the Workflow category:
  6. Next, because we want that the workflow will be run when it is demanded to run, check the "On Demand" field:

    Notice that you can also choose to run the Workflow when the record is deleted, or reassigned, when its status changes , or when some field is updated.
  7. Now we will add steps to the workflow. To create a Letter on demand, let's select "Create Record":

  8. Type a description for the Step, and go to "Set Properties" in order to design the Letter:
  9. Now you can design what you want the Letter to be, for example, let's type a Subject and also select the Sender of the Letter. Next, add some Description and the Letter's Date:
  10. When you are done, Save and Close the dialog:
  11. Don't forget to activate the Workflow:

  12. Now let's create a new Account and see how it works:
  13. Now go to the Accounts list, and search for the Account we just created, to see the Letter attached to it. Go to the Advanced Search, and set the following search: "ACCOUNT NAME - CONTAINS - SEBASTIAN": (finally click on Results to see the required record)
  14. We have found the new Account we just created:
  15. On the Account, press "Run Workflow": that means it will run On Demand:
  16. On the Workflows dialog, select the Workflow we just designed:
  17. Now that we started the Wokflow, we want to check if it has finished:
  18. Lets check whether the workflow has finished its work:

    The status of the workflow is "Succeded": that means its done.
  19. Now lets see the Letter created. So open the Account and then go to the Activities:
  20. There we will see the Letter that the Workflow created automatically On Demand:

  21. And Welcome to the Letter issued On Demand:



  22. That's all...Enjoy Dynamics CRM


    כתב: כרמל שוורצמן CRM

Tuesday, September 17, 2013

How to create a Dynamics CRM Workflow to send Letters

by Carmel Schvartzman
  1. In this walkthrough we will learn Step-By-Step how to create a Workflow in Dynamics CRM 2011/2013, to send a Letter to some Entity. A Workflow is a custom process that run in the application background and whose aim is to automatize business tasks , and is built on steps. After creation, a Workflow can be triggered by entities creation, assignment or deletion, by changes on the entity, and even can be called on demand. For Example, we can use a Workflow to make a Letter each time some new Account is created:

    How to create a Dynamics CRM Workflow to send Letters
  2. In order to create a new Workflow, go to Customize the System, and then to Processes:
  3. Click on New:
  4. Type a relevant Process Name and select the Entity you want the Workflow apply to:


    In our case, the Entity is Account.
  5. Select the Workflow category:
  6. Next state that the workflow will be run both when a new rescord (Account) is created, or when is demanded to run:

    Notice that you can choose also to run the Workflow when the record is deleted, reassigned, when its status changes , or when some field is updated.
  7. Now we can add steps to the workflow. To create a Letter when an Account is created, let's select "Create Record":
  8. Type a description of the Step, and go to "Set Properties" in order to design the Letter:
  9. Here you can design what you want the Letter to be, for example, let's type a Subject and select the Sender of the Letter, add also some Description and the Date:
  10. Whn you are done, Save and Close the dialog:
  11. Finally, activate the Workflow:
  12. Now let's create a new Account to see how it works:

    After entering some data, Save and Close the new Account form.
  13. Now on the Accounts list, search for the Account we just created, to see the Letter attached to it. Go to Advanced Search, and set the following search: " ACCOUNT NAME - CONTAINS - SEBASTIAN ":  (click on Results to see the required record)

  14. We have found the new Account created:
  15. Open the Account and then go to the Activities:
  16. There you will see the Letter that the Workflow created automatically:
  17. Open the Letter and take a look at the data in it:




    That's all...Enjoy Dynamics CRM !!!


    כתב: כרמל שוורצמן

Step-By-Step adding a Javascript alert to a Form

by Carmel Schvartzman
  1. In this walkthrough we will learn How-to add a Javascript alert message to a Form. We'll accomplish that via adding a Web Resource to the Form. A Web Resource is a file that is stored in the CRM, and can be HTML, CSS, JAVASCRIPT, Silverlight or a picture file.
    We'll add a Web Resource to the Campaigns form, to open an alert message box when changing a field value. This is an snapshot of what we'll create:
  2. In Customize the System go to "Web Resources":
  3. There click on New:
  4. On the dialog that opens, type a relevant Name and Display Name to the new Web Resource:

    The Type of the file will be "Script" in our case, so select it from the list.
  5. Notice that we could use the "Upload file" option, for large script files. In our case, we'll use the Text Editor option:
  6. Type the following code for a javascript function definition:
  7. Now type this code to display an alert window :
  8. After you save the function, you'll notice that a new URL have been added to the Web Resource dialog. Is the url of the resource, and if you double click it, you could open the saved resource and check it:
  9. Save the Web Resource and don't forget to Publish it:
  10. Now we can add the Web Resource to a CRM form. Select the form  entity you want to add it:
  11. On the Main Form, open the Form Properties, and click on the ADD libraries:
  12. There can be a lot of files, so look for our resource, using the Search box:
  13. When you find the resource, click OK:
  14. You have just added the resource to the CRM Form, making it available for use:
  15. Because we want to display a message on the CRM Form, when a field has changed, select the field, the Campaign Type, for example, which is an option list. We want that when the user change the selected value, a warning message alerts her/him to double-check the selection. Therefore, the ONCHANGE event will fit us for that goal. Select the field and click on Change Properties:
  16. On the "Evenst" tab, select the OnChange option and click "ADD":
  17. When the OnChange  Event Handler dialog opens, select the Library that holds aour function, and type the function's name. Then click OK:
  18. Notice that the Event Handler has been added to the OnChange handlers list:


    Click OK to save the dialog.
  19. Save the CRM Form and don't forget to Publish it:
  20. Now lets check how it works. Go to the Workspace, and then to Campaigns. Open a Campaign, and change the Campaign Type:
  21. After changed, the message is displayed:
    adding a Javascript alert to a Form

    In this tutorial we learned adding a Javascript alert to a Form . That's All...Enjoy CRM!!!


    כתב: כרמל שוורצמן