Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Add Primary Contact to Existing Accounts

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

A number of accounts on our online CRM have contact emails associated with them but no primary contact defined. Is there an easy way to add a primary contact in this scenario to the existing accounts without having to manually define each one. (Note:- We are indifferent on which email against the account is defined as a primary contact)

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Add Primary Contact to Existing Accounts

    Run an advanced find to get all accounts with no primary contact and an email address, then run the workflow mentioned above on all of these records to assign the primary contact.

    you could do an advanced find on contacts who parent account had no Primary contact

    https://www.segbo.co.uk/

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Add Primary Contact to Existing Accounts

    see my issue now. the contact I was running it against was incomplete - all works fine now. Thanks for your help.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Add Primary Contact to Existing Accounts

    Thanks for clarifying the advanced find step.

    I am also struggling defining the correct on-demand workflow. Can you clarify - I think I'm selecteing the wrong fields - at the moment I have defined the entity within the process as a Contact, and added a step to update Company Name (Account) with the set properties form showing primary contact field box with dynamic value selected as:-  (Company Name (Contact)).

    I get the message

    Contact with ID = ................   Does Not Exist

    Thanks

  • Verified answer
    Hosk Profile Picture
    Hosk on at
    RE: Add Primary Contact to Existing Accounts

    I think you need to do the advanced find using contacts because other wise I can't really think of a way you can assign (many) contacts to an account primary contact field.

    Advanced find

    look for Contacts

    Select Company Name (Account) - this is not a contact field by a choice below the contact fields in related entities.

    Primary contact  Does not contain data

    this is the fetchXML from the select

    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">

    <entity name="contact">

    <attribute name="fullname"/>

    <attribute name="telephone1"/>

    <attribute name="contactid"/>

    <order attribute="fullname" descending="false"/>

    <link-entity name="account" from="accountid" to="parentcustomerid" alias="ag">

    <filter type="and">

    <condition attribute="primarycontactid" operator="null"/>

    </filter>

    </link-entity>

    </entity>

    </fetch>

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Add Primary Contact to Existing Accounts

    Thanks for this - can you clarify what fields  you use to define the advanced find that returns the contacts who have a parent account with no primary contact.  I'm struggling to get any results returned having used the following and its unclear if I'm selecting the correct fields:-

    look for Contacts:

    Select Accounts (Primary Contact)

                                Select  Accounts (Parent Account)

                                     Primary Contact Does Not Contain Data

    Thanks

  • Suggested answer
    Alessandro Graps Profile Picture
    Alessandro Graps 2,664 on at
    RE: Add Primary Contact to Existing Accounts

    Hi,

    Maybe this links can be help you:

    www.powerobjects.com/.../microsoft-dynamics-crm-data-import-setting-primary-contact-field

  • Suggested answer
    Hosk Profile Picture
    Hosk on at
    RE: Add Primary Contact to Existing Accounts

    you could do an advanced find on contacts who parent account had no Primary contact

    Then on these list you could create an ondemand workflow which would set the contact you run the workflow against as the primary contact.

  • Tristan Profile Picture
    Tristan 161 on at
    RE: Add Primary Contact to Existing Accounts

    You could create a custom workflow step which looked up the contact based on the email address and then assigned that contact as the primary contact on the account.

    You could then run an advanced find to get all accounts with no primary contact and an email address, then run the workflow mentioned above on all of these records to assign the primary contact.

    Thanks,

    Tristan

    www.infinityconsult.co.uk

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,074 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,900 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans