Knowledge found and lost while working with Microsoft Dynamics CRM
RSS icon Home icon
  • CRM 4.0 Workflow: Setting the Primary Contact's Parent Customer

    Posted on January 21st, 2008 Mitch Milam Print Print 10 comments

    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.

    Dynamics CRM, Workflow
    1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 3.00 out of 5)
    Loading ... Loading ...
    6,581 views
     

    10 responses to “CRM 4.0 Workflow: Setting the Primary Contact's Parent Customer”

    1. HI.. this piece of information was really usefull for me.. I followed each & every step written in te above Blog, but the workflow is not working i.e when i creat an account & set its primary contact, the contact's parent customer is not being pointed to the Account. what might have gone wrong., could you please help??
      Thanks..

    2. Hi , the above written piece of information was really useful to me. I followed each & every step written here, but the wrokflow is not working, i.e. when i creat an account & update is primary contact, the primary contact's parent customer is not being pointed to the contact. Where I might have gone wrong..Can you please help in this matter..?

    3. Hi , the above written piece of information was really useful to me. I followed each & every step written here, but the wrokflow is not working, i.e. when i create an account & update is primary contact, the primary contact's parent customer is not being pointed to the contact. Where I might have gone wrong..Can you please help in this matter..?

    4. Hello,

      Thanks a lot for the example.

      It helped me a lot.

      Cheers

      Sheela

    5. I got this to work and it is fantastic.

    6. Is there a way in CRM 4.0 to automatically populate the contact address, phone and fax details with the details from the parent account. I want to do this not just for future records, but also for exisiting contact records.

    7. If you create a contact, by having the parent acount open, selecting contacts, then clicking the new button, any fields that are mapped from the Account to Contact will automatically populate.

      If you just open Contacts from the main CRM navigation, then click the new button, this process does not occur.

    8. [...] My good friend Mitch Milam graciously pointed out that he had already posted a similar blog on his site. Personally, I think my post is superior, but Mitch's isn't too bad. ;-) Published: [...]

    9. is there any way to set a computed field automatically thru workflows?

      e.g.
      FIELD 1 = FIELD 2 * FIELD 3

      when record is created or FIELD 2/3 is updated, FIELD 1 will automatically recompute.

      i'm aware of the other options i have, but wondering if this can be done thru workflows as i think this is a common functionality which is kinda odd if it's not supported.

    10. Take a look at the Business Workflow Productiity Tools Accelerator.
      http://crmaccelerators.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=19132

    Leave a reply