Like everybody else out there after upgrading to CRM 2013 some customizations stopped working. Customizations, let’s not use the strong term “non-supported”, which may panic some people, but let’s refer to them as a grey area. Customizations like pre-filtering the entities for the lookups for partylists fields (like on activity entities the “to” and “cc” fields). In CRM 2011 the well-known code that sets up the “lookuptypenames”, “lookuptypes”, “lookuptypeIcons” and “defaulttype” attributes of the DOM element of the respective fields worked perfectly.

After a few days of digging through the new layout/DOM structure of CRM 2013 for the respective entities/forms I found how the new process works and where and how the attributes look. Surprisingly, the attributes are on the search image (the magnifying glass) and are the same plus a couple of new ones. One big difference I bump into… on the create form it is there from the beginning, on the update form it is not, but it will be injected on focusing on the input control. So without further ado here it is:

Be sure you add the JQuery library to the form prior using this code.