Wednesday 19 October 2011

An Error has occurred when adding a new Product

I got an An Error has occurred error message when using a Microsoft Dynamics CRM 4.0 test environment, trying adding a new Product




MSCRM Error Report:

--------------------------------------------------------------------------------------------------------

Error: Exception has been thrown by the target of an invocation.

Error Number: 0x80043B0A

Error Message: The unit schedule id is missing.

Error Details: The unit schedule id is missing.


The resolution was simple - The Unit Group field needs to be filled in.  Being a test environment, this field had been changed from Business Required to Optional.  It does shows how useful the CRM Diag tool for CRM 4.0 is for quickly finding issues.





Specified Reporting Services Report Server URL http://SERVERNAME/ReportServer cannot be resolved into IP. The requested name is valid, but no data of the requested type was found


A Quick Post today, I had the following error when installing Dynamics CRM 2011

Specified Reporting Services Report Server URL http://SERVERNAME/ReportServer cannot be resolved into IP. The requested name is valid, but no data of the requested type was found

The resolution was simple - I had manually typed in the Report Server Address as it was different from the default and it was spelt incorrect.  Double check the Report Server URL. 

Hope this helps somebody
Tony

Monday 17 October 2011

Extending Microsoft Dynamics CRM 4.0 – eCampaign

Caveat – Before I start I would like to declare my interests.  I work for a Microsoft Gold Partner who has deployed eCampaign on customer sites.

I have intended to write this for a while and with the release of the latest version for Dynamics CRM 2011 out soon, I thought I would review the Dynamics CRM 4.0 version from a CRM Administrator Point of View.
To sum up what eCampaign is all about, eCampaign massively extends the marketing capabilities within Microsoft Dynamics CRM 4.0

Users can quickly and easily plan, build and deliver Marketing Campaigns that meets the needs of both the Marketing and Sales Departments within an organisation.  Most useful of all, the user never needs to leave the familiar dynamics CRM environment which has meant that from the go, the organisation has the ability to deliver an exceptional Marketing Experience to its customers.
Key Features

  • HTML Emails using a WYSIWYG Editor
  • Tracking of all emails in Dynamics CRM
  • Reporting Capabilities
  • Unsubscribe facility
  • Emails sent via Email Router

Using eCampaign

As you would expect, everything takes place from the Marketing Area in the Dynamics CRM left hand Menu

 
Setting up an eCampaign is as simple as filling in the following fields

 
·         Name – This is the name of the eCampaign
·         Marketing List – This is the marketing list which will contain all the members to be emailed
·         Subscription – This is what the members of the Market List are added to.  This is also the list that users are removed from when a user Unsubscribes from an email.
·        Member Type – This is filled in automatical when the marketing list is added.  You have the option for Accounts, Contacts or Leads
·         Status – The options are Draft or Ready to Launch

 

 
·         Start Date – The Start Date of the eCampaign
 
·         End Date – The End Date of the eCampaign
 
·         Sender – Emails can be sent as the eCampaign Queue, Campaign owner, Selected user or Record Owner.

 

 
·         Delay Sending – ecampaigns can be configuered to be sent a specific Date and Time in the future.

 

 
·         Send Email to Reciptitants – There is a choice of which Email address to choose when sending the eCampaign

  
·         Attachments – Multiple attachments can be added to the eCampaign, up to a limit of 5MB

 
·         Email Message – When creating an email you can choose from a template provided by eCampign or use the existing Email templates from Dynamics CRM

 

 
What you see is what you get (WYSIWYG) editor

 
Once everything has been checked the email is ready to launch.  To do this the user selects “Ready to Launch” from the status field.  The email will either send immediately or if the Delay Sending option is being used, wait for the Date for the delay to occur.

It’s not unusual for an eCampaign to be planned, build, tested and sent all within an 30 minutes of a sales meeting ending or the release of an important press statement.

eCampaign Settings

eCampaign Settings are accessible from Settings menu in CRM.

There are options to 
·         Set the default queue
·         Administer the image library
·         Modify the subscription page
·         Modify the Header and Footer of the email
·         Manage the Bulk subscriptions (Add users from Marketing lists to Subscriptions – Members of a marketing list not included on a subscription will not be receive any emails)

 
Reporting

The reporting feature within eCampaign has to be my favourite feature.  There at a glance stats related to the eCampaign or you can dig deeper.  I especially like know how many clicks there have been on each link within the email.
At a glance stats from the eCampaign view

 
Detailed Information

 
Links Clicks Report

 

There are many many other features which I do not intend to touch on as this is a simple Overview of eCampaign for CRM 4.0
This is a superb product, that in each site it has been installed on has performed brilliantly and been very well received.

The product can be downloaded from the following location http://downloads.mycrmgroup.com

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.

Tuesday 23 August 2011

Dynamics CRM ActivityPointer Master / Detail Report

In the following post I am going to explain how I created a Master / Detail Report Using Report Builder 3.0 and Dynamics CRM 2011.  This report is also known as a Header and Detail Report.  I am going to use the FilteredActivityPointer (ActivityPointer) table to display all activities for each Incident (Case).

1)      Start by creating a blank report in Report Builder.  Create your Data Source and then your Data Set
I have used the SQL following for my dataset

SELECT top 100
FilteredActivityPointer.activitytypecodename,
FilteredActivityPointer.subject,
FilteredActivityPointer.description,
FilteredActivityPointer.statuscodename,
FilteredActivityPointer.createdbyname,
FilteredIncident.ticketnumber,
FilteredIncident.title,
FilteredIncident.customeridname,
FilteredIncident.responsiblecontactidname,
FilteredIncident.createdon
FROM         FilteredActivityPointer INNER JOIN
                      FilteredIncident ON FilteredActivityPointer.regardingobjectid = FilteredIncident.incidentid
where activitytypecodename != 'Case Resolution'


2)      Add a List to the report

3)      In the Tablix Properties page.. select the dataset to be used



4)      At the bottom of the Report Builder Applciation window, Right Click Details and Select Group Properties…




5)      On the Group Properties window, choose to Add a Group Expression on the general tab.

I have chosen to add ticketnumber





6)      You are now free to add your Text Fields and your corresponding Tablix.

The Name, Date, Case Number and Case Title are Text Boxes.

The table was created using a Matrix.




The final result should be similar to the following.  Here you can see the Activities for each Case where the Case details are the Master and the Activities are the Slave / Detail information.


 If anybody wants to know how to do the Activity Icons – Leave a comment or contact me on twitter and I will be more than happy to oblige.
Tony


Tuesday 21 June 2011

Microsoft Dynamics CRM 4.0 Error Message – Font ‘Verdana’ does not support style 'Bold’

While performing both an update to Microsoft Dynamics CRM 4.0 Update Rollup 16 and also while running the Mictrosoft Dynamics CRM Configuration Wizard I received the following error message





Exception has been thrown by the target of an invocation. Font 'Verdana' does not support style 'Bold'.



I would normally use the CRM Diagnostics tool to look at the root cause but this was a remote installation that needed to be completed to a tight deadline.  Seeing this was an issue with a font I imedaiately looked towards the C:\Windows\Fonts folder.

My first thought was to take a copy of the Verdana font from another working machine and copy this to the machine having the issue. 

Copying the Verdana font to a shared location will create four files.  These will need to be copied to the C:\Windows\Fonts on the machine having the issue


Once this was completed I was able to run Rollup 16 and the Configuration Wizard.  This extra step tool an additional 10 minutes but I was still able to meet the agreed time for the installation with the user.

Thursday 16 June 2011

Microsoft Dynamics CRM 2011 New Features: Dynamic Marketing list

Please consider the following example.  In my CRM 2011 Testing environment I have the following contacts.  Using the Address 1: Country field I have 5 Contacts from the U.S. and 9 Contacts from the U.K

Lets assume I want to carry out a Marketing Campaign to only the Contacts that have a Country Value of U.K.
In CRM 4.0 I could use add these users to a marketing list, but the marketing list would only be accurate for the time it was created.  After the initial steps of adding the Contacts there is a possibility that the marketing list would be inaccurate.  In the example above, if a user migrated to the U.S. and CRM was updated to reflect this they would still be on the list marketing from the time they were initialy added. This would be the case until the Contact was manual removed.
Dynamic Marketing list changes this. In the same way users use Advanced Find,  Dynamic Marketing Lists allow us to create always accurate marketing lists based on criteria we set.
Consider the following example;
1)      Create a Marketing List – ensure you set the member type as Contact and Type as Dynamic, then save

2)      Select Manage Members from the Ribbon
3)      The next window is essential the Advanced Find window.  Select the Saved View you have created for the Dynamic marketing List or start from scratch.  Here I am going to start with Active Contacts saved view and modify this to include where Country equals U.K.
4)      Select Marketing List Members to view the members that have been added.

If you need marketing lists which are always up-to-date based on a predetermined filter the Dynamic feature is brilliant.
For those who still want to keep full control over the membership of a Marketing List, there is the Static option which requires users to manually add and remove members from the list.

Friday 10 June 2011

Dynamics CRM 4.0 for Outlook – Invalid Argument

If you use the From field in Microsoft Outlook while using Microsoft Dynamics CRM 4.0 and you Track the email, you may experience the following error when trying to send the email.





Invalid Argument Do you want to send the e-mail? If you click Yes, the e-mail will be sent out, but no corresponding activity will be created in Microsoft Dynamics CRM.


To begin resolving this issue I went straight to the CRM 4.0 Diagnostics Tool and ran a Trace from the Microsoft Dynamics CRM Server.  Once I had replicated the error, I Found the following error message in the trace file.

>CrmSoapExtension detected CrmException:
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.Crm.CrmArgumentException: The specified sender type is not supported. ---> System.ArgumentException: The specified sender type is not supported.

From my own experience of troubleshooting the Email Router I knew that the Invalid sender type was like due to email address I was trying to send from was in the system twice.
To troubleshoot further I used the brilliant script provided by Ben Lec (http://blogs.msdn.com/b/benlec/archive/2008/12/23/incoming-e-mails-are-not-tracked-in-crm.aspx)
For the email address below I used the email I was trying to Send FROM (Not my own)


declare @emailAddress as varchar(100)

set @emailAddress = 'support@tnyCRM.com'

SELECT FullName, SystemUserId, InternalEmailAddress, PersonalEMailAddress
FROM SystemUserBase
WHERE InternalEMailAddress = @emailAddress
OR PersonalEMailAddress = @emailAddress


SELECT Name, QueueId, EMailAddress
FROM QueueBase
WHERE EMailAddress = @emailAddress

SELECT Name, AccountId, EMailAddress1, EMailAddress2, EMailAddress3
FROM AccountBase
WHERE EMailAddress1 = @emailAddress
OR EMailAddress2 = @emailAddress
OR EMailAddress3 = @emailAddress

SELECT FullName, ContactId, EMailAddress1, EMailAddress2, EMailAddress3
FROM ContactBase
WHERE EMailAddress1 = @emailAddress
OR EMailAddress2 = @emailAddress
OR EMailAddress3 = @emailAddress

SELECT Subject, LeadId, EMailAddress1, EMailAddress2, EMailAddress3
FROM LeadBase
WHERE EMailAddress1 = @emailAddress
OR EMailAddress2 = @emailAddress
OR EMailAddress3 = @emailAddress

In my results I found that a Queue and a User were sharing the same E-mail address.  This was creating the Invalid Argument error.  Removing the email address from the user and keeping the address in the queue enabled me to send the email.

This issue occurs because when CRM tries to send an email through outlook and the sender is support@tnyCRM.com, it will search in the whole database to see who has an email address equal to support@tnyCRM.com.
If other records, for example an Account, Lead, Contact, User or Queue are also using support@tnyCRM.com in the From field in their email, the system will not know which record to track the email against and the email will not send as Tracked.