Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Answered

Prevent Users even Super Users or Internal Admin to Delete Specific Company

Posted on by 15,428

Hi

Do you know any out of the box method that can prevent users even super user or Internal Admin to delete a specific company? 

Thanks 

  • MahGah Profile Picture
    MahGah 15,428 on at
    RE: Prevent Users even Super Users or Internal Admin to Delete Specific Company

    Hi Vaishnavi

    Thank you so much. Looks like this is not possible without development. I was hoping to ignore development here. Thanks again

  • MahGah Profile Picture
    MahGah 15,428 on at
    RE: Prevent Users even Super Users or Internal Admin to Delete Specific Company

    Thanks Kim for suggestion. I tried this but the challenge is now super user for environment cannot perform some tasks. Thanks again  

  • Suggested answer
    Vaishnavi J Profile Picture
    Vaishnavi J 3,056 on at
    RE: Prevent Users even Super Users or Internal Admin to Delete Specific Company

    Hi,

    You can add a boolean in User Setup page to restrict the user to delete the companies.

    and based on that boolean field use a event subscriber and call onbeforedelete event on the page "Companies" 

    pastedimage1645549801029v1.png

    pastedimage1645551018885v1.png

    Also, in order to have access or visibility of boolean field in user setup page you can hardcode the user value which should have the access of boolean field edit or you need to remove the permission of modifying the user setup data from the users.

    If my answer was helpful to you, please verify it so that other users know it worked. Thank you very much.

  • Verified answer
    Dallefeld Profile Picture
    Dallefeld 11,425 User Group Leader on at
    RE: Prevent Users even Super Users or Internal Admin to Delete Specific Company

    That's hard. You could try assigning companies to the Super permission set (leaving out the ones that you want to restrict)

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans