Monday, December 19, 2011

CRM 2011 Dialog guide

Hi, one of my favorite new features of CRM 2011 is Dialogs! This is more of a interactive workflow where the user gets guided thou a prosess.

To explain Dialogs, I've created a simple use-case: This is part 1 out of x !? ;)
I have a lot of leads and want to create a custom lead convert.
1. I want to check if the lead have a company allready in CRM as an account
2. I want to check if it exists two leads against same company
- + You could add more checks

So let's get dirty and create this dialog :)

First thing first:
Start by planning the keyelements you'll be needing in this Dialog.
1. We'll going to need two queries.
  • Find all Accounts that might be a duplicate.
  • Find all Leads that might be the same company.
2. The steps we're going to need are:
  • Build up Queries
  • Check the Queries
3. Have a basic thought of the logic under each step:
Build up Queries
  • Find all Accounts where: Accountname in Accounts entity equals/contains Company field in selected lead
  • Find all Leads where: Company field in selected lead equals/contains company field in other leads
Check the Queries
  • If  the query "Find all Accounts that might be a duplicate." contains more then zero records AND the query "Find all Leads that might be the same company." contains more then one recod. (Since we running dialog on one of them)
    • Promt user and ask what to do
  • Else if:
    • "Find all Accounts that might be a duplicate." contains more then zero records
      • Promt user and ask what to do
    • "Find all Leads that might be the same company." contains more then one record
      • Promt user and ask what to do
  • Default:
    • Promte user and tell no duplicates or other leads are found, ask what he wanna create:
      • Create Account: Yes/No
      • Create Contact: Yes/No
      • Create Opportunity Yes/No
    • if Create Account equals yes
      • Start Child Dialog "Create Account"
    • if Create Contact equals yes
      • Start Child Dialog "Create Contacs"
    • if Create Opportunity equals yes
      • Start Child Dialog "Create Opportunity"
The reason why it's important to have a basic drawing of these steps and if's are that it's hard/impossible to re-design the dialog when first started. (You can't re-design the logical hierarki)

Let's build this Dialog! I've created a videoguide as I'm to lazy typing down every detail and taking lots of screenshots :P

Part 1:
Creating the basics for the dialog:
(Note I'm doing one error! The IF ("Find all Leads that might be the same company." contains more then one record. I'll correct the error in next part!)
Part 2:
Creating the default action (Normal convert)
Part 3:
Creating the what will happen if "Find all Leads that might be the same company." contains more then one record
Part 4:
Creating the what will happen if "Find all Accounts that might be a duplicate." contains more then zero records

Part 5:
Creating the what will happen if "Find all Accounts that might be a duplicate." contains more then zero records AND the query "Find all Leads that might be the same company." contains more then one recod.
Good luck devoloping futher!!

Sunday, December 11, 2011

A few must have Tools for CRM 2011

Hi, I'm sorry is been a lot to do at work the past few weeks, so few updates :( But here comes a nice one, a list of nice tools for MS CRM 2011 with a short description:
http://pragmatoolkit.codeplex.com/
It provides easy user interface to create custom buttons and add to CRM Ribbon without having to manually modify the underlying XML files. It also takes care of creating the solution and publishing it back to MS CRM 2011.
http://jswebresourcemanager.codeplex.com/
JavaScript Web Resource Manager for Microsoft Dynamics CRM 2011 helps CRM developers to extract javascript web resources to disk, maintain them and import changes back to CRM database.
You will no longer have to perform mutliple clicks operation to update your js web resources
http://crm2011odatatool.codeplex.com/
The CRM 2011 OData Query Designer is a Silverlight 4 application that is packaged as a Managed CRM 2011 Solution. This tool allows you to build OData queries by selecting filter criteria, select attributes and order by attributes. The tool also allows you to Execute the query and view the ATOM and JSON data returned.
http://crm2011metabrowser.codeplex.com/
The CRM 2011 Metadata Browser is a Silverlight 4 application that is packaged as a Managed CRM 2011 Solution. This tool allows you to view metadata within CRM including Entities, Attributes and Relationships.
http://roleupdater.codeplex.com/
Role Updater for Microsoft Dynamics CRM 2011 makes it easier for CRM 2011 administrators and developers to add or remove privileges to multiple security roles in one operation.
You'll no longer have to open each security role and apply privileges one by one.
- This application is compatible with OnPremise, Online and Claims based authentication deployments

Hope these tools give you an early Chrismast vecation by saving you some time :)