Wednesday, July 23, 2008

CRM: Set Primary Contact

A client recently had this issue: How can I make sure that every account created has a Primary Contact?

You can do this by creating a workflow. The details are below:

Step 1: To create this workflow, go to Settings > Workflows and click the “New” button. Name the workflow rule “Set Primary Contact” and choose the Contact as the entity for the rule.

Click OK to launch the Workflow editor.

Step 2: Leave the default settings for the “Scope” and the “Start When” options and click where it says “Select this row and click Add Step.” Add the step “Check Condition” as shown below:

For the step description, type “Check if parent account has primary contact.” Then, in the “If” clause, click the link to configure the condition. Check to see if the related “Parent Customer (Account)” Primary Contact field Does Not Contain Data.

Save and close this window.

Step 3: Next, click the second row of the If statement, and click Add Step > Update Record. Let’s give this one the description “Set Primary Contact.” In the Update drop down, choose “Parent Customer (Account)” under the Related Entities.

Step 4: Click the “Set Properties” button and the Account form will open. Place your cursor in the Primary Contact field, and in the form assistant on the right you’ll notice that CRM has set the Operator and Look For values to Contact. Leave these as they are and click the “Add” and “OK” buttons to add this value to the Primary Contact field.

Save and Close this window, and then publish your workflow.

To test the rule, create a new Contact for an Account that has no Primary Contact. When creating your new contact be sure to fill in the Parent Customer field on the Contact form. Save the contact and navigate to your Accounts list view and open the Account. Your new Contact should now be set as the Primary Contact for the Account.

No comments: