Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

How to disable button using security

(0) ShareShare
ReportReport
Posted on by 630

Hi All,

In custom form i have added Edit button and i would like to disable that button for some user.

Please let me know how to achieve this.

Regards

Rahul

  • Suggested answer
    Andrew Xu Profile Picture
    Andrew Xu 3,877 on at
    RE: How to disable button using security

    you can set the property 'Needed Permission' of that button to 'Manual', then you'll be able to set permissions to allow/deny the execution of that button.

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,965 Super User 2025 Season 1 on at
    RE: How to disable button using security

    Hi Rahul,

    Can you describe the technical details what control type you used, what properties you set and how you added this button on the form?

  • Martin Dráb Profile Picture
    Martin Dráb 230,836 Most Valuable Professional on at
    RE: How to disable button using security

    Please explain the purpose of this button. It doesn't make sense to me.

  • Rahul.p Profile Picture
    Rahul.p 630 on at
    RE: How to disable button using security

    Those are the command Button control and set the command property to EditRecord.

    pastedimage1679643023032v1.png

    I have created privilege and set access level to Read, but Edit button is enable and user want Edit button should disable.

    Please let me know how to disable edit button.

  • Suggested answer
    Mohit Rampal Profile Picture
    Mohit Rampal 12,552 Super User 2024 Season 1 on at
    RE: How to disable button using security

    Hi Rahul, It can be done by assigning View security privilege to those users. You should create two privileges (View and Maintain) of your custom form and assign privileges to users as required. You can check these privileges on any form from Security Diagnostics.

    Also, please provide more details on how you have created Edit button in form.

    Check this article

    dynamics365musings.com/.../

  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 230,836 Most Valuable Professional on at
    RE: How to disable button using security in D365FO

    You need to focus on access to the data source / table, not on the button.

    If you don't want to allow the users to make any changes in the given form, simply give them only read access to the form (through the menu item). Of course, you can configure permissions in a more granular way if needed.

    By the way, you shouldn't have added the Edit button. You're duplicating standard functionality, and the standard Rdit button respects permissions of the linked data source. You risk spending time with developing something unnecessary and also worse that what's already there.

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…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

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

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,965 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,836 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans