Though Part I, Part II and Part III was written in german language – because of the popularity I decided to switch to english this time. Recently we´ve been part of a couple of migration projects where we supported partners/customers to migrate their existing solutions to work successfully with Microsoft Dynamics CRM 2015 Update 1.
One of the famous customizations we figured out is to create a customer attribute by manipulating an existing lookup field to allow searching for multiple entities and storing the value.
To identify this customization you should take a look at the following lines of code:
lookuptypeIcons = ‘/_imgs/ico_16_2.gif:/_imgs/ico_16_4.gif:/_imgs/ico_16_8.gif';
lookuptypenames = ‘contact:2:Contact,lead:4:Lead,systemuser:8:User';
lookuptypes = ‘2,4,8’;
value.displayClass = “ms-crm-Lookup-Item”;
value.keyValues = new Object();
value.values = new Object();
value.onclick = “openlui()”;
value.id = savedId;
value.entityType = savedEntityName;
value.typename = savedEntityName;
value.name = savedName;
value.type = savedType;
The issue you’ll find using this type of customization is, that it contains unsupported code and DOM Manipulation. Therefore you will receive an error message like this during onLoad(). As the Custom Code Validation (CCV) Tool probably won´t recognize this as unsupported, cause it cannot identify what the code action does, you´ll have to identify manually, if you´re using this kind of customization.
Now that you´ve identified such customization – what are your options to correct the code and stay supported? As we currently don´t have an attribute type “customer” we can add to our form, the supported options would be:
a) avoid using a customer attribute and try to use an assigning to account, lead or contact directly
b) build a web-resource (HTML) and build a custom attribute to request data from different entity types and store the information inside the appropriate attirbute, such as a hidden account, contact or lead lookup
c) go for a custom activity entity where you´ll get a regarding attribute by default which is a multiple entity lookup control.
You do have other options and want others to participate from? Just send a comment and help others staying supported and avoid getting unwanted script error messages while upgrading to Microsoft Dynamics CRM 2015 Update 1.
Until next time…