Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Deactivated contact still shows as a contact person for an Account

(0) ShareShare
ReportReport
Posted on by 262

Hi I understand from other threads that for OOB configuration, when you deactivate an account, it will not deactivate the contacts.

My question would be, if you deactivate a contact because the staff for that account has left, would the OOB configuration remove that contact association from existing account?

How can we remove the contact from that account automatically if the staff has left the company? Thank you.

*This post is locked for comments

  • Suggested answer
    Rawish Kumar Profile Picture
    Rawish Kumar 13,756 on at
    RE: Deactivated contact still shows as a contact person for an Account

    Hi, On account if you have a subgrid of contacts.

    you open the form editor > click on subgrid > click on edit properties 

    and you will presented with the window that i showed earlier in whcih you will have option to change default view with your criteria.

  • colinkgl Profile Picture
    colinkgl 262 on at
    RE: Deactivated contact still shows as a contact person for an Account

    acc_5F00_cont.jpg

    HI Rawish,

    Attached a sample of our Account forms.

    The primary contact is a form field.

    When you click on Keith for e.g. you will go to Contact - Keith and there is a field that says parent account which will show AB Holdings

    How can I go to the properties page that you mentioned? I tried looking for it both in properties of Accounts - Pri Contact fields and Contacts itself. Thank you.

  • Suggested answer
    RE: Deactivated contact still shows as a contact person for an Account

    Hi colinkgl ,

    you have two way (not oob) to do this:

    1) by plugin/custom workflow: when statecode change, search for accounts filled with that contact, and set contact field null.

    2) by scheduled task: every night check for deactivate contact deactivated in last 2-3 days then search for accounts filled with these contact, and set contact field null.

    Hope it helps!

    If you found the answer helpful, please mark as Verified 

    Join my network on LinkedIn      Follow me on Twitter 

    Thank You & Best Regards

    Francesco Picchi

    Microsoft Dynamics CRM Consultant, Bologna+Milano, ITALY

    Independent Contractor

    http://www.francescopicchi.com

  • RE: Deactivated contact still shows as a contact person for an Account

    Why would you use a plugin when a WF would do it?

    Pointless waste of time and money!!!!!

  • Verified answer
    tw0sh3ds Profile Picture
    tw0sh3ds 5,600 on at
    RE: Deactivated contact still shows as a contact person for an Account

    You can also do it without any programming, simply create a workflow which will fire on "State change" of contact. In this workflow check if state is Inactive and if yes, simply clear the Account field on contact. This will disassociate the contact from the account. In my opinion it's better to show only active contacts on account form and don't disassociate deactivated contacts - in such way you will have the full history in your system, sometimes it's useful to have information that person XYZ was working in company Contoso, event if he/she is no longer working there

  • Suggested answer
    Rawish Kumar Profile Picture
    Rawish Kumar 13,756 on at
    RE: Deactivated contact still shows as a contact person for an Account

    above suggestion will stop contact to be shown however if actually need to remove the contact - you need to write a plugin on contact and need to register it in both SetState and SetStateDynamicEntity, message where you can get regarding accounts record and set primary contact lookup to null.

    You can use this post as a reference: www.mindfiresolutions.com/Plugin-for-SetState-Message-1753.php

    mark my suggestion as verified if helpful.

  • Suggested answer
    Rawish Kumar Profile Picture
    Rawish Kumar 13,756 on at
    RE: Deactivated contact still shows as a contact person for an Account

    Hi, 

    you can change the filter or the view itself which is being used at the subgird :

    6330.contact.PNG

    mark my answer as verified if helpful.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

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

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans