{Dynamics CRM} Default Potential Customer lookup to show only accounts/ Contacts in CRM 2013 Business Process Flows

In the opportunity entity, we have a field “Potential Customer” which is of type “Customer” and it can be both account or contact entity. However sometimes we might need to customize the same to show only contacts or accounts.
For this in the form load of the opportunity entity, just add the two lines of code shown below.
$(“#customerid”).attr(“lookuptypes”, “1”);
$(“#customerid”).find(“img”).attr(“lookuptypes”, “1”);
However in CRM 2013 if we are using business process flows and we include the Potential Customer in the business process flow, the above line of code wouldn’t do the job for you. For that just add the two lines of code shown below.
$(“#header_process_customerid”).attr(“lookuptypes”, “1”);
$(“#header_process_customerid”).find(“img”).attr(“lookuptypes”, “1”);
 
Hope this helps!