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.
- Build up Queries
- Check the Queries
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
- 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"
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!!