locked
Change the default entity in the lookup window in PhoneCall Form RRS feed

  • Question

  • Hello,

    I'm trying to write a javascript to change the default entity in the lookup window for the 'from' field to use the Contact entity. Right now Account is the default entity.

    So this is what I have:

    document.getElementById("from").setAttribute("defaulttype", "2");
    var ViewGUID= "a2d479c5-53e3-4c69-addd-802327e67a0d";
    Xrm.Page.getControl("from").setDefaultView(ViewGUID);

    I got the code actually from this website #34: http://garethtuckercrm.com/2011/03/16/jscript-reference-for-microsoft-dynamics-crm-2011/

    I attached the function into the form and publish the solution however it's still showing Account as the default entity.

    Any idea is appreciated. Thanks.

    -tri

    Friday, March 27, 2015 12:25 AM