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

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Answered

Contact Deactivation permission based on rule

(0) ShareShare
ReportReport
Posted on by 2

I'm looking for suggestions as to how you might approach the following:

I have a requirement to stop users being from able to deactivate a Contact IF the contact currently has a record in Custom Entity "X"

Example -

Contact DOES has a row in the custom entity table under their name. Contact shouldn't be able to be deactivated

Contact does NOT have a row in the custom entity table under their name. Contact should be able to be deactivated

I have the same question (0)
  • Verified answer
    Leah Ju Profile Picture
    Microsoft Employee on at
    RE: Contact Deactivation permission based on rule

    Hi Partner,

    IF the contact currently has a record in Custom Entity "X"

    The contact and custom entity have N:1 relationship? contacts are child records for the custom entity?

    pastedimage1681802775040v1.png

    If so, one lookup field related to custom entity should on the contact entity.

    pastedimage1681804020321v3.png

    When contact has a row in the custom entity table, the lookup should be populated with the custom entity.

    pastedimage1681803994957v2.png

    Then you can create one real-time workflow to achieve your goal.

    pastedimage1681804339357v4.png

    pastedimage1681804510637v5.png

    pastedimage1681804553675v6.png

    Save and active the workflow.

    Test:

    pastedimage1681804724000v7.png

  • Manbehindthecurtain Profile Picture
    2 on at
    RE: Contact Deactivation permission based on rule

    This was great! I had to adjust your suggestion a bit, but it was exactly the kind of template I was looking for, Thanks!

    The reason I had to adjust is the custom entity may have multiple records associated to each contact.

    I created a field that's updated by an onload function to count the number of records in the associated entity to the contact.

    Then I used your suggestion, but made the condition that if the custom counting field > 0, to cancel.

    Thanks again!

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 51 Super User 2025 Season 2

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 46

#3
CU23101130-0 Profile Picture

CU23101130-0 17

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans