Author Archive

How to create charts in MS Dynamics crm 2011 and add them to a Dashboard?

June 20, 2011 Leave a comment

Microsoft Dynamics CRM 2011  provides a new feature to customize  visualization chart against a single entity view,  so we can see graphical representation of data using your CRM views.  This helps to analyze the data in a better manner. CRM 2011 provide 5 different type of charts namely

  • Column Charts,
  • Bar Charts, 
  • Line Charts,
  • Pie Charts and
  • Funnel Charts.

Now I am going to discuss how to create charts against a entity view. We can show graphic visualization between any two fields of an entity which are related to each other. For this purpose let us take an example to create chart for contact entity’s two fields “created on” Vs “fullname” of contact.

Now we can use following steps to create chart.

step – 1   Goto  the settings area and open your solution package.

step -2  Click on the contact entity and  double click on the chart from the left menus.

step – 3 Now we can make a new chart for contact entity.

 In above image we can see  picklist field of different view and second field for chart name  now we can select 2 fields name of entity from picklist for which want want to see chart.

Now we can see no. of contact createdon different weeks in the form of a bar chart.

Now I will be discussing how to create dashboard for charts and list?

Follow the steps below.

Step -1 Goto workplace, then to Dashboard.

Step – 2  Click the new button from Dashboard ribbon tool bar (See highlighted in the image below)

Step -3   Select the layout for dashboard.

Step -4  Please provide a name to the Dashboard. If you look closely on the dashboard section you will see 4 different images 1) Represent adding a chart 2) Represent adding a list 3) Represent adding a Web resource etc. Here we will be adding a Chart, so click on the chart image.

Step 5- On clicking the chart image a new window will open (see image below).  Now simply select an entity and view along with the Chart you want to add.  Once done click ‘Ok’ button.

Now you can see dashboard for contact entity records.

Hope this helps.

Categories: CRM 2011 Tags:

How to populate a parent form lookup field value in a child form without using fetch xml in CRM 2011

June 11, 2011 Leave a comment

If we want to retrieve data of a lookup field of parent form in a child form lookup field then we can use very easy javascript code without fetch xml in CRM 2011.

Let your parent form entity be Case(Incident) in which we need to retrieve a field name Customer of type   lookup (Having two types of values i.e. contact and account) in this lookup field.

The child  entity name casetask   having 1:N relationship(Case to Case task) and  Casetask entity has a lookup field of  Customer Contact in Casetask form so we can retrieve the custtomer data which is filled in Case entity(Customer field)  in the Casetask entity (Customer Contact  field )

So we can use  following  javascript code.

Define the function SETVALUE()

function SETVALUE()
if (Xrm.Page.ui.getFormType() == 1)  //Check if  form is in create mode
var oType =crmForm.ObjectTypeCode;
if ( != null)
if ( ( != null) &&
    ( != null) &&
    ( != null) &&
    ( != null)) // Check if parent form is null
var parentForm =;
if (parentForm.ObjectTypeName == “incident”) // Check if parent form type is same or different
var lookupData = new Array();
var lookupItem= new Object();

if (parentForm.all.new_customerid.DataValue && parentForm.all.new_customerid.DataValue[0].id  ) //Check parent customer id field is not null 
var contactname   = parentForm.all.new_contact.DataValue[0].name  ; parentForm.all.new_contact.DataValue[0].id ; = contactname ;
lookupItem.entityType = “contact” ;
lookupData[0] = lookupItem;
Xrm.Page.getAttribute(“new_customerid”).setValue( lookupData );                


Categories: CRM, CRM 2011 Tags:

How to add a subgrid in a crmForm for displaying related records in crm 2011

June 8, 2011 Leave a comment

CRM 2011 brings along really cool and easy to use features. Today we will talk  about one of them and that is, how to show a sub grid of a related entity on a master entity.

How does it help to show related entity grid on a CRM 2011 form?

The answer is simple, it is all about usability if you can see all the communication activities of a contact on the same form without clicking or going to a new tab isn’t it wonderful. It saves you time and improves user experience.

How to do it?

Let us take a scenario to answer this question. Suppose you have an entity in CRM 2011 by name Organization now you want to show all employees of this organization in a sub grid on organization entity. For doing so please follow the following steps

1- Go to your solution and open organization entity form as shown in the image below

Image 1

CRM 2011 Form Customization screen

Customization screen

2- Now goto insert tab in left top of the organization form as shown in image below.



3- Click on the subgrid button.


How to add Sub Grid

4- select tab  in which you want to add subgrid.


5- After clicking on the subgrid button (that appears on the top of the form) you will see it requires the following

Name ,Label,checkbox for display label on the form and in the datasource section you can see

1- Picklist of records (select only related record ).

2- Entity picklist(for which you want to add picklist).

3.Picklist of different views you can select according to your need.Edit and New button are also available if you want to update or make a new view as per your requirements

Now you can select different checkbox from Additional options section according to your need


Hope this helps

Categories: CRM 2011 Tags:

How to do a filter lookup on entity with 1:N relation in CRM 2011?

May 16, 2011 Leave a comment

Hi Guys, was just wondering if the filtered lookup have been provided by the standard CRM 2011 system out of box. Just found some days back while I was implementing a requirement for a new client so thought to share it with you all.  Follow the steps below for magic to unwind.

For filtering lookup field of contact related to the parent Customer(Account)
we use the following step for filtered record in this field.

step1-Go to the form of the customize entity and open Primary contact lookup field.

step 2-Go to the related record filtering section of the field property. Here you can see only show record where condition-you select Contact(Parent Customer (Accounts)) and select current record and you can also  allow user turn off filtering by using check-box. Allow user to turn off filter.

step 3- you can also select different  view from the view selector property of the field

After this save the form and publish the customization and you can see the magic that record filtered from the parent contact.

Hope this helps

Categories: CRM 2011 Tags:
%d bloggers like this: