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 dialogs


A dialog differs from a workflow through the fact that it is an interactive process, where user input is required. The addition of dialogs offers new possibilities with Dynamics CRM 2011.

Getting ready

We will be using the same solution package we created earlier.

How to do it...

Adding a dialog is done by performing the following steps:

  1. Open the existing solution package, and navigate to Processes.

  2. In the Processes view, click on New to add a new process.

  3. On the Process: New window, select Dialog this time.

  4. Keep New blank process selected and click on OK.

  5. The dialog configuration window allows us configure the dialog details. A dialog can be started as either an on-demand process, or as a child of another process. This allows us to create smaller dialogs, and chain them together as required to achieve our final result. We will mark this dialog as an on-demand process, so we can see the very basic functionality available.

  6. To capture user interaction, we will first add a page to the dialog, and then a Prompt and Response on that page.

  7. Click on Set Properties to define the prompt and available answers.

  8. Click on Save and Close to finish defining this step.

  9. In the process builder, add a new Update step that will fill in the captured details within the form field.

  10. Click on Set Properties to define which value gets assigned to what field. We are being presented with the standard Contact form. Click into the First Name field, and from the Form Assistant, select New contact first name under Local Values in the Look for drop-down list, and Response Text. Click on Add and then OK.

  11. Save and Close this form. Save the dialog and activate it.

  12. To test this newly created dialog, create a new Contact record, and from the ribbon, click on the Start Dialog button.

  13. From the selection window that opens up, select the dialog we created earlier.

  14. Click on OK and answer the prompt question.

  15. Click on Next. When the dialog finishes, an end of dialog window is displayed. Click on Finish.

  16. Once the dialog completes execution, you will see the value captured during the dialog populated into the contact's first name field.

How it works...

For demonstration purposes we have only captured the contact's first name and populated the first name field. More steps can be added to a dialog to capture additional information and guide a system user in capturing all required details through a dialog rather than by using a free form. This way a "script" can be created for the user to capture information in a specific order, thus enforcing a clean, repeatable process in dealing with customers in a Call Centre scenario.