Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 55831

Change Customer Lookup Behavior

$
0
0

Hi, by default CRM allows a user to select either account or contact when clicking on the customer lookup field.

I have been looking for a solution to have the Customer lookup only Accounts. I've added this line to my JScript, which works fine (I am aware this is an unsupported solution):

    document.getElementById("parentcustomerid_i").setAttribute("defaulttype", 1);
    document.getElementById("parentcustomerid_i").setAttribute("lookuptypenames", "account:1:Account");
    document.getElementById("parentcustomerid_i").setAttribute("lookuptypes", "1")


 This works fine on the Contact form. My issue is that this is not working for the Contact Quick Create form:

    document.getElementById("parentcustomerid").setAttribute("defaulttype", 1);
    document.getElementById("parentcustomerid").setAttribute("lookuptypenames", "account:1:Account");
    document.getElementById("parentcustomerid").setAttribute("lookuptypes", "1")


 You can see all I changed was the field name (parentcustomerid_i and parentcustomerid). Any suggestions?

Thanks in advance.


Viewing all articles
Browse latest Browse all 55831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>