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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

How can I gray out a form field?

(0) ShareShare
ReportReport
Posted on by 190

I want to gray out a form field so the user cannot edit it.  I only want to ungray it if some conditions are true, then user can change the field.  I am able to lock a field, but I want to gray it out.  Thanks. 

I have the same question (0)
  • Suggested answer
    Bipin D365 Profile Picture
    28,983 Moderator on at

    Hi,

    You can use Business Rule to disable field on the form based on condition.

    docs.microsoft.com/.../create-business-rules-recommendations-apply-logic-form

  • bp3378 Profile Picture
    190 on at

    that’s like locking the field right?   How can I lock it and gray out the field?

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi bp3378,

    In the business rule, you can use 'Lock/Unlock' components to lock/unlock the field based on one condition:

    pastedimage1655868529663v2.png

    In the form,you can see a lock icon in front of the field label if the conditions are met:

     pastedimage1655868616766v3.png

    When you hover over the field, the field will be greyed out.

    pastedimage1655868764770v4.png

  • Suggested answer
    Amit Katariya007 Profile Picture
    10,409 Super User 2025 Season 2 on at

    Hello,

    You can make your field as "Gray out" or "Ready only" using 2 ways.

    1. JavaScript

    2. Business Rule

    If you want some basic conditions/checks then you can use the Business rule but there are some limitations with the Business rule like it will not do advanced condition checks, for that you can use the JavaScript.

    Also don't be confused between Read only and Locked Field.

    community.dynamics.com/.../read-only-vs-lock-field

    Thank you,

    Amit Katariya

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 74

#3
Martin Dráb Profile Picture

Martin Dráb 64 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans