web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
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 268

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

I have the same question (0)
  • Suggested answer
    Rawish Kumar Profile Picture
    13,758 on at

    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.

  • Suggested answer
    Rawish Kumar Profile Picture
    13,758 on at

    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.

  • Verified answer
    tw0sh3ds Profile Picture
    5,600 on at

    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

  • Community Member Profile Picture
    on at

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

    Pointless waste of time and money!!!!!

  • Suggested answer
    Community Member Profile Picture
    on at

    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

  • colinkgl Profile Picture
    268 on at

    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
    Rawish Kumar Profile Picture
    13,758 on at

    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.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans