locked
Set The default lookup entity in crm 2013 RRS feed

  • Question

  • Set the default lookup entity in ms crm 2013(In Case customer Lookup )

    i tried the below code but its not working 

    document.getElementById('customerid').setAttribute('defaulttype', '2');
    Xrm.Page.getControl('customerid').setDefaultView('A2D479C5-53E3-4C69-ADDD-802327E67A0D');


    ms crm

    Monday, January 27, 2014 11:44 AM

All replies

  • Hello,

    Any news regarding this issue?

    Best regards,

    Waldemar

     
    Thursday, March 13, 2014 8:45 AM
  • Hi Waldemark,

    It appears those methods are not supported in CRM 2013. I still haven't got anything for CRM 2013.


    Admin QuikView Solution for CRM 2013

    Thursday, March 13, 2014 9:41 AM
  • i had tried during that time but the i dnt resolve it ,,,

    ms crm

    Thursday, March 13, 2014 10:01 AM
  • function defaultView(){
    
    document.getElementById("customerid").setAttribute("defaulttype", "2");
    Xrm.Page.getControl("customerid").setDefaultView("a2d479c5-53e3-4c69-addd-802327e67a0d");
    // default type - contact entity 
    }
    Plz use this code it working good
    may be you are using single(') quote so Use double(")

    Muhammad Sohail


    Hi Sohail,

    Did this work for you in CRM 2013? I've not been able to make this work.


    Admin QuikView Solution for CRM 2013

    Thursday, March 13, 2014 2:50 PM
  • This is for CRM 2011 this code not work for CRM 2013

    Hi, the "document.getElementById()" method is not supported in CRM 2011 and also in CRM 2013. i recomend you to use the new CRM 2013 method "addCustomFilter", you can find an example here:
    Visit Link


    Muhammad Sohail


    • Edited by sohail450 Thursday, March 13, 2014 3:11 PM
    Thursday, March 13, 2014 3:10 PM