locked
CRM 4.0 - Disable focus for a disabled lookup field RRS feed

  • Question

  • Hi all,

    I am having difficulty disallowing the tab action onto a lookup field that is greyed out (disabled). I can still tab onto that disabled lookup field (cursor is still highlighted on the field but I need the focus to be set on to the next field on the form).

    Here is my code onload of my form:


    var myField = crmForm.all.lookupid;
    
    myField.onfocus = function A()
    {
      // Set focus of some other field
    }

    This code only work for text field and NOT lookups for some reason.

    Thanks in advance.

    Stanley



    Tuesday, June 11, 2013 7:04 AM

Answers

  • try crmForm.all.lookupid_d

    though it is unsupported, in CRM 4 we could use _c and _d suffix to access the label and data controls.

    HTH

    Sam


    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"

    • Marked as answer by Stanley_Lai Tuesday, June 11, 2013 11:47 PM
    Tuesday, June 11, 2013 8:24 AM

All replies

  • try crmForm.all.lookupid_d

    though it is unsupported, in CRM 4 we could use _c and _d suffix to access the label and data controls.

    HTH

    Sam


    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"

    • Marked as answer by Stanley_Lai Tuesday, June 11, 2013 11:47 PM
    Tuesday, June 11, 2013 8:24 AM
  • Thanks Sam that did the job :)
    • Edited by Stanley_Lai Tuesday, June 11, 2013 11:47 PM
    Tuesday, June 11, 2013 11:47 PM