Book Image

Microsoft Dynamics CRM 2011 Scripting Cookbook

By : NICOLAE TARLA, Nicolae Tarla
Book Image

Microsoft Dynamics CRM 2011 Scripting Cookbook

By: NICOLAE TARLA, Nicolae Tarla

Overview of this book

With the increased adoption of Dynamics CRM 2011, more people are faced with various tasks including administering and customizing the environment. Microsoft Dynamics CRM is a Customer Relationship Management software package from Microsoft. It offers solutions to help companies with Sales, Customer Services, and Marketing. Microsoft Dynamics CRM is increasingly being used by businesses of all kinds and all sizes to reach audiences in new ways. Microsoft Dynamics CRM scripting extends system customization through the use of client-side scripting. It builds on the standard customization options offered by Dynamics CRM."Microsoft Dynamics CRM 2011 Scripting Cookbook" walks the reader through the process of customizing an environment, from the most basic topics such as working with specific fields and types, working with the forms, and then moves on to the more advanced topics of scripting and debugging your scripts, designing new form and ribbon elements, and using additional well known public scripting libraries, as well as integrating external data sources into your environment.The first chapters of this book cover the basics of using the wizard-driven customization approach, packaging your customization into solutions, and adding basic scripts to interact with all the form elements. Further down the road we start introducing concepts around debugging your scripts, working with ribbon elements and navigation, taking advantage of other public scripting libraries and integrating them into your solutions, as well as light ways to bring social information in front of your users.Later chapters will assume knowledge of some of the most basic customizations presented at the beginning of the book. After completing the recipes in "Microsoft Dynamics CRM 2011 Scripting Cookbook", you will have gained a new perspective on how far can you take the customization in Dynamics CRM. The additional details presented around using other public scripting libraries and integrating other data sources into your environment should serve as a start into investigating additional sources.
Table of Contents (17 chapters)
Microsoft Dynamics CRM 2011 Scripting Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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.

  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.

  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.

  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.

  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.

  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.

  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