locked
Disabling a Field in CRM 4 RRS feed

  • Question

  • Good Morning,

    I have two quesitons:

    1) I am using the following code to disable a date look field:

    crmForm.all.po_cclnoticeofsaletocarriercompleteddate.disabled = true;
    crmForm.all.po_cclnoticeofsaletocarriercompleteddateimg.disabled = true;
    crmForm.all.po_cclnoticeofsaletocarriercompleteddateimg.src = '/_imgs/btn_dis_cal.gif';

    My first question is can I also turn the box around the date field a light gray instead of the standard black?

    2) How do I do this same thing with a look up field (one that has a magnifying glass next to it)?


    Thanks, Dale

    Tuesday, February 5, 2013 2:58 PM

Answers

  • Please also check the following link

    http://customerfx.com/pages/crmdeveloper/2006/03/06/readonly-and-disabled-fields.aspx


    Hope this helps. If you get answer of your question, please mark the response as an answer and vote as helpful !
    Vikram !

    • Marked as answer by GWG Admin Wednesday, February 6, 2013 12:30 PM
    Wednesday, February 6, 2013 8:25 AM

All replies

  • Hello Dale,

    Try to use simple

    crmForm.all.po_cclnoticeofsaletocarriercompleteddate.Disabled = true;

    it should disable whole field instead of parts like you are doing.


    Freelance Developer for Dynamics CRM 4.0/2011

    • Proposed as answer by _Vikram Wednesday, February 6, 2013 8:25 AM
    Wednesday, February 6, 2013 7:26 AM
    Moderator
  • Please also check the following link

    http://customerfx.com/pages/crmdeveloper/2006/03/06/readonly-and-disabled-fields.aspx


    Hope this helps. If you get answer of your question, please mark the response as an answer and vote as helpful !
    Vikram !

    • Marked as answer by GWG Admin Wednesday, February 6, 2013 12:30 PM
    Wednesday, February 6, 2013 8:25 AM