onfocus event of a lookup in crm 2011 RRS feed

  • Question

  • hi frnds,

    Is it possible to fire a onfocus event for lookup in crm. i tried using onclick event but the i cant able to view lookup dialog box. Can any one suggest how to fire onfocus event of a lookup...

                  Thanx in advance...

    Arun Kumar G

    • Edited by Aronkumar Thursday, July 4, 2013 7:28 AM
    Thursday, July 4, 2013 7:27 AM

All replies

  • Dear Faisal,

              Thanx u for ur answer but am not asking to set focus to a field i need to fire some event(function) when the lookup field get the focus..



    Arun Kumar G

    Thursday, July 4, 2013 7:53 AM
  • Hi Arun,

    There no OOB onfocus event is exposed for CRM fields, but you should be able to attach this event to your form controls.


    but keep in mind this will be unsupported.

    Our Website | Our Blog | Follow US | My Facebook Page | Microsoft Dynamics CRM 2011 Application Design
    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

    Thursday, July 4, 2013 8:04 AM
  • add this code in your javascript file

    and register ONLOAD function on load event of form.

    function ONLOAD() {

    function Onfucus() {



    where preferredlanguageid is your field name

    Hope this helps. ----------------------------------------------------------------------- Santosh Bhagat If this post answers your question, please click "Mark As Answer" on the post and "Vote as Helpful"

    Thursday, July 4, 2013 8:55 AM