How can i set fields read only dynamically using C# RRS feed

  • Question

  • Hi

    I have multiple entities and from that whatever field is selected by user,that field should have to  read only.so i have to make it read only forcefully ,but  which field i have to set as read only that should i know at that time only..

    How can i set any field read only dynamically using C#

    Can anyone give me the solution?

    Thursday, May 5, 2016 8:50 AM

All replies

  • It is not possible to make a field read-only through c#.


    You can do it easily through Client Side coding i.e. JavaScripts.



    Dynamics CRM MVP | Inogic | http://inogic.blogspot.com| news at inogic dot com

    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Friday, May 6, 2016 9:25 AM
  • Hi,

    As Sam Suggested, CRM has a rich client side scripting features and documentation.

    Please Refer:


    Ramanathan Rajendran MCTS - Dynamics CRM

    Saturday, May 7, 2016 4:59 PM
  • Try this,


    UpdateAttributeRequestrequest = newUpdateAttributeRequest();

    request.EntityName = "X"

    request.Attribute.RequiredLevel.Value =  AttributeRequiredLevel.None


    Thursday, May 12, 2016 11:59 AM