Change Default Entity Lookup RRS feed

  • Question

  • Hello,

    We are on CRM 2013 on-prem.

    We try to avoid users setting contact parent account ID to another contact. They can only set parent account ID to an account.

    So I wrote a javascript on the on-load event of the contact form as follow. But how do I remove 'Contact' from the dropdown field when user does a search?

    // Default Customer lookup field to Account
            var parentcustomerId = document.getElementById("parentcustomerid");

            parentcustomerId.setAttribute("lookuptypes", "1");
            parentcustomerId.setAttribute("lookuptypeIcons", "/_imgs/ico_16_1.gif");
            parentcustomerId.setAttribute("defaulttype", "1");

    Friday, June 12, 2015 10:57 PM

All replies

  • Hi,

    As u have mentioned you are using CRM 2013, the above code might not work. Have a look at the below link.

    It uses Jquery to filter the partylist.


    Hope this helps!!!



    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

    Monday, June 15, 2015 3:38 AM
  • Does this help?


    Thanks, Chris

    Monday, June 15, 2015 8:15 AM
  • Thank you all for the responses. Unfortunately we have many issues today, so I'll try the suggestion and will give updates.

    Thanks again!


    Monday, June 15, 2015 8:48 PM