[UPDATE 10/10/2013] With CRM 2013, you need not use this add-on (ISV). This feature is now built into CRM 2013, it is called "Quick View Control". It is much more advance and easy to configure. For more details here Quick View Control

When we put Lookup control on CRM 2011 form, by default it shows only one attribute (mostly name attribute) of the Lookup entity. If User wanted to see more detail information about Lookup record, they can click it and open Lookup details form. Although this serves the purpose, it’s still an extra click that user have to make to see the details of Lookup field.

It would have been good if User don’t have to click and can see Lookup entity fields data in Child form itself. CRM does provide Entity Mapping which allows to Pre-populate mapping attributes at the time of creation of Child record, however it has its own limitations. To overcome some of the limitations of Entity Mapping I have created a Web Resource Utility which can be found at CRM 2011 Attribute Mapping

I also developed more light weight Web Resource Utility which does not required any Entity Mapping and still give Lookup Entity field data on CRM 2011 main form.

Following screen shot demonstrates the utility

Demo Screen:1

Demo_Screen_1

Each Lookup field can have their corresponding Web Resource on form. With the help of my JavaScript library CRM Customizer can decide attributes of the Lookup entity to be shown on form in tabular format.

Web Resource can be placed anywhere on the form.

Demo Screen: 2

Demo_Screen_2

If Lookup attribute is empty, Utility will still show the Empty Web Resource.

Demo Screen: 3

Demo_Screen_3

Utility does cover error situations. In case CRM customizer have incorrectly set parameters in JavaScript Library or if columns got deleted from Lookup attribute after it is configured in child form JavaScript library, utility does show appropriate message to take corrective action.

Instructions

Managed Solution contains following components

1. lookupr/Scripts/jquery_1.6.4.min.js

2. lookupr/Scripts/SDK.RetrieveData.js

3. lookupr/Scripts/LookupPreviewScript.js

4. lookupr/Lookup_Preview.htm

Steps

1. Open the form on which you wanted to put Lookup Preview.

2. Add a Web Resource to form

Instruction_1

  1.  
    1. Select Web Resource as lookupr/Lookup_Preview.htm
    2. Give Name and Label to Web Resource, note exact name of WebResource for later use.
    3. In “Formatting” tab select Number of rows, minimum 2 rows are required, but depending upon data length this number can be increased.
    4. Unselect “Display border”.

3. Save the Customization.

4. In form Properties, select JavaScript web resources as shown below

Instruction_2

5. Event Handler

Instruction_3

On Form OnLoad even select library as lookupr/Scripts/LookupPreviewScript.js and function as LoadLookPreviewDelayed

Function LoadLookPreviewDelayed takes following arguments

1.Web Resource Name : This is Name of Lookup_Preview.htm that was give in earlier step

2. Lookup Attribute Id: AttributeID of Lookup Attribute for which Lookup Preview is required.

3. Attribute Set: This is pipe (|) separated list of Label and attribute name from Lookup entity which needs

to be shown in Lookup Preview. Label and Attribute Name must be separated by#

Example for Attribute Set is 'Job Title#jobtitle|EmailId#emailaddress1|Telephone#telephone1|Language#new_preferredlanguage|DoNotEmail#donotemail'

Version : LookupPreview_1_0_2_0_managed.zip

In this version added new argument for layout
Function LoadLookPreviewDelayed takes following arguments
1.Web Resource Name : This is Name of Lookup_Preview.htm that was give in earlier step
2. Lookup Attribute Id: AttributeID of Lookup Attribute for which Lookup Preview is required.
3. Attribute Set: This is pipe (|) separated list of Label and attribute name from Lookup entity which needs to be shown in Lookup Preview. Label and Attribute Name must be separated by#
4. Layout: Default is "H" - Horizontal
Possible Values are: "V" - Vertical , "Z" - Left to Right and Top to Bottom, "N" - Reversed N, that is Top To Bottom and Left to Right
Example for Attribute Set is 'Job Title#jobtitle|EmailId#emailaddress1|Telephone#telephone1|Language#new_preferredlanguage|DoNotEmail#donotemail', 'Z'

Demo Screen with various Layouts

Demo_Screen_4

X

Last edited Apr 2 at 10:12 PM by makarand_keer, version 11