views:

18

answers:

1

I'm using microsoft dynamics crm 4

I inserted the following line to restrict a customer lookup to contacts only (no accounts):

crmForm.all.customerid.setAttribute("lookuptypes", "2");

It does restrict the lookup to contacts only, but there is a strange bug:

When i select any customer, the icon next to him becomes the account icon, not the contact icon (folder instead of card)

Any solutions to this ?

+1  A: 

Here is the answer:

var customer = crmForm.all.customerid;
customer.lookuptypes = "2";
customer.lookuptypenames = "contact:2";
customer.lookuptypeIcons = "/_imgs/ico_16_2.gif";
customer.defaulttype = "2";

Posted by Andriy a33ik Butenko, in reply to my question on the msdn dynamics forum.

Amr Hesham Abdel Majeed