Friday 23 September 2011

Dynamics CRM 2011 - Outlook Reminders and Flags not working

One of my team noticed (after being 15 minutes late for a meeting) that they were no longer receiving Reminders for appointments in Outlook 2011.

On further investigation Reminders worked CRM was disabled but not when CRM was enabled.  They were on the latest rollup at the time, Rollup 3.

This led me to search the Knowledge Base and I found the following;
http://support.microsoft.com/kb/2586274

Outlook Reminders and Flags not working after installing Microsoft Office 2010 SP1 or Public Update 2583910 for Office 2007 with Dynamics CRM 2011
Symptoms
After installing Microsoft Office 2010 SP1 or the September 13, 2011 public update for Outlook 2007 (2583910), you notice that you are not getting reminders for your appointments anymore. Also using the flags to mark your follow-up items no longer work. When trying to flag an item for follow-up the item will be marked as completed and the flagged items will not show in the To-Do Bar.

Resolution
The fix for this is included in the August update for Office 2010. http://support.microsoft.com/kb/2588842

The Outlook 2010 update needed to resolve this issue is available on this KB
http://support.microsoft.com/kb/2584053

The Outlook 2007 update needed to resolve this issue is available on this KB
http://support.microsoft.com/kb/2553028




I simply installed the update above and this did the trick.  I hope this helps somebody having the same issue with reminders / notifications

Thursday 22 September 2011

Dynamics CRM 2011: How to create a Data Map using the Download Template for Import XML file

In this post I intend to cover how to create a Data Map using the Download Template for Import XML file

I had a requirement where I needed to create my own custom data map, but I did not want to do this from scratch.  Microsoft Dynamics CRM 2011 differs from CRM 4.0 when it comes to creating data maps.  In CRM 4.0 I could do this using a wizard; however this is not available in CRM 2011.

Begin by using the “Download Template for Import” option in CRM from the entity you require a data map for.  This creates an xml file with the data map already included.

Open the file in Excel and fill in any one column with data.


Save As a CSV file

The most import step here is to RENAME the file from Lead to anything other name.  Here I have used a 1Lead1.csv


Select the “Import  Data” option in CRM and upload the newly saved CSV File

Select Next on the Review File Upload summary window


Select Default (Automatic Mapping) option


Select your Entity name from the drop down


Select Next (If any fields are not automatically mapped, they will need to be done on this window.  Select “Show Unmapped” to find which fields these are)


Select next on the review window


The following is where we get the option to create a Data Map.  Enter a Data Map Name.


 
Now in the Data Management areas in Settings we will be able to see the custom Data Map.



This can be done for, and not limited to, the following entities; leads, contacts, accounts, opportunities, address, case, e-mail, note and quote


Tuesday 13 September 2011

Report Builder – Replace Empty Table Values with a zero

If you are creating a highly customised report you may come across a situation where your dataset may not return any results.

If this happens your table with render with blank.  I have come across a solution to enable these empty / null values to be replaced with zeros if the dataset query returns no results

Consider the following example report


The Total column uses the following query to sum the number of records from the dataset results where the prioritycodename = 2
 

=Sum(IIF(Fields!prioritycodename.Value = "2", 1, 0))


If the dataset returns no results this field will be blank.  On an SLA report this is not desirable.  I would prefer to see a 0 instead.  To achieve this I used the following query
 

=IIF(ISNOTHING(sum(Fields!prioritycodename.Value)),0,Sum(IIF(Fields!prioritycodename.Value = "2", 1, 0)))
 

In English the above query reads as,

If sum of prioritycodename equals zero, display a zero in the table, otherwise count the instances of prioritycodename where prioritycode = 2

I think you will agree the report looks a lot better with zeros than blank rows / lines

Dynamics CRM 2011 - Calculate current age from Date of Birth


I could not find how to calculate current age from Date of Birth ( DOB ) on the internet so I have decided to write this post to help others with the same requirement.
 


function CalculateAge()
{
if(Xrm.Page.getAttribute("birthdate").getValue() != null) 

       var now = new Date(); 
       var birthday = Xrm.Page.getAttribute("birthdate").getValue(); 
       var monthdif = now.getMonth() - birthday.getMonth(); 
       var nowyear = Xrm.Page.getAttribute("birthdate").getValue().getFullYear(); 
       if(monthdif > -1) 
       {
                  
                Xrm.Page.getAttribute("new_age").setValue(now.getFullYear() - birthday.getFullYear());
       }
       else
       {
               Xrm.Page.getAttribute("new_age").setValue(now.getFullYear() - birthday.getFullYear()-1);
       }
}
}


How it works,
If the contact has already had their birthday this year, you simply subtract the year of birth from the current year.  If they have not yet have their birthday, you will need to subtract 1 from the above sum.

I also used getFullYear() and not getYear() as this uses YYYY instead of YY.  For example, 1984 instead of 84.  Using getYear(), if you enter a date before 2000 you will get strange results.  

A big thank you to Neil McDonald @ http://xrmrocks.com/?tag=calculateage whose Dynamics CRM 4 solution I used to create the following.