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

how to remove accounts views in customer lookup in Case Entity

$
0
0

Iam Working on Customer Lookup in case entity.customer want to show only contacts not accounts. i tried some code

lookfor: Contact is getting

but for lookin : account views are coming.how do you get contact views and to remove account views?could help on this

below is the screen shot

  

this is the code i used

function CustomerLookup() {
var View = Xrm.Page.getControl("customerid").getDefaultView();

Xrm.Page.getControl("customerid").setDefaultView("{A2D479C5-53E3-4C69-ADDD-802327E67A0D}");
Xrm.Page.getControl("customerid").addPreSearch(addFilter);
}
function addFilter() {
document.getElementById("customerid_i").setAttribute("lookuptypenames", "contact:2:Contact");
document.getElementById("customerid_i").setAttribute("lookuptypes", "2");
}

setDefaultview is also not setting.

help needed.

Thanks


Viewing all articles
Browse latest Browse all 79901

Trending Articles



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