I am becoming more and more impressed with the workflow capabilities of CRM 4.0.  I am finding that I can create workflows to automate minor tasks to enhance CRM's functionality or to correct what I consider to be "annoyances."

One of these involves the relationship between the Primary Contact for an Account and that Contact's Parent Customer field. 

When I set the Primary Contact on an Account, I would like it to automatically edit that Contact's record and update the Parent Customer field to point back to the Account.  It's always seemed fairly logical to me to have these two fields linked, but that's not the way it has worked, until now.

We're going to define a workflow based on the Account Entity ( I've renamed my Account Entity to be Company, but it works just the same ).  Here's how the initial workflow configuration will look:

image

Options:

Start when:

  • Record is created
  • Record attributes change ( select the Primary Contact Attribute )

Available to Run:

  • On demand

Steps:

1) Check for existing data

1a) If the Primary Contact's Parent Customer Attribute does not contain data, perform the next step:

 image

( Basically, if the user has set the Attribute manually, we don't wish to overwrite their work. )

2) Update the Related Entities: Primary Contact record.

3) Set the Parent Customer Attribute:

image

This will make our workflow look like this:

image

Publish the workflow.  From this point forward, every time you set the Primary Contact for an Account, the workflow rule will run and if you have not already, it will update the Primary Contact's Parent Customer Attribute to point to the Account.