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 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. 

  • Suggested answer
    Bipin D365 Profile Picture
    28,995 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 Moderator 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

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

#1
ParthPatel249 Profile Picture

ParthPatel249 62

#2
11manish Profile Picture

11manish 48 Super User 2026 Season 2

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 40 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans