2008-04-23

CRM 4 ScaleGroup Job Editor

As we are facing some DELETIONSTATECODE issues regarding Contacts and Leads we have been googling for a solution. Marco found this useful CRM 4 ScaleGroup Job Editor utility.

"This utility is used to change the DeletionService and Re-Indexing service jobs in CRM 4.0. You can set the next run date/time of a job as well as change the schedule at which the job will continue to run automatically. " as you can red here.

This utility works but it didn't solve our issues... And the search for a solution continues as we also try to better frame the issue.

2008-04-22

Marketing Campaign Offer Limitation Workaround

In my previous post I told you about the Marketing Campaign OFFER (objective) limitation of 2000 characters. That's a very short amount of characters specially if you want to send HTML e-mail materials! This system attribute/field can't be changed like regular (non-system) attributes/fields. But Jim Wang found a way to change it! Thank you Jim Wang for this precious yet simple workaround:


  1. Export the Campaign Activity entity;

  2. Edit the "customization.xml" file (look for attribute/field "objective" and change length to up 100.000 characters);

  3. Import the "customization.xml" to your CRM;

  4. Publish your customization (just to make sure!).

This workaround may be unsupported but according to Jim Wang it's pretty safe. I hope Microsoft reviews this 2000 characters limitation and/or the ability to change it.

Virtualization Support for Microsoft Dynamics CRM 4.0

Menno te Koppele's blog called my attention to this: "Microsoft Dynamics CRM 4.0 is officially supported to run on a computer that is running Microsoft Virtual Server 2005 in production systems.". You can read Menno's post here and Microsoft's related KB here.

This is great because I'm actually deploying my MS CRM Dynamics 4.0 development environment on a Virtual Server 2005 and I want to follow this approach for my production environment.

However be aware of the following "Microsoft does not test or support Microsoft software on a computer that is running non-Microsoft hardware virtualization software. ".

2008-04-18

Marketing Campaign Offer Limited to 2000 characters

On a previous post I explained How to send HTML marketing e-mails. What I didn't know at the time was that the OFFER field is limited to 2000 characters! First I didn't panic because I thought I could change it... But now I'm very worried because I can't change this system attribute/field!



If your HTML exceeds 2000 characters it will be truncated!

It isn't very difficult to write HTML pages with more than 2000 characters, specially if you have to include a lot of long links as I have to.



Suggestions how to hack this 2000 characters limit?

MS Dynamics CRM 4.0 Implementation Guide Refreshed

Miscrosoft released a new version (4.1.0) of the Implementation Guide (IG). You should get it here. The IG consists of the Planning Guide, Planning Tools, Installation Guide and Operating and Maintaining Guide. I'm printing it as we speak.

2008-04-17

Travel Distribution Summit Europe'08 here I go!

It's official: I'm going to the Travel Distribution Summit Europe'08! I finally got the green light and I already booked hotel and flight. I will be attending mainly the CRM and Loyalty Strategies Conference. The conference/summit will take place at London's Business Design Centre between May 20-21 2008. If you are also attending this conference drop me a line.


2008-04-16

How to hide buttons in MS CRM 4.0 in runtime

I googled about hiding buttons in MS CRM 4.0 and I was sent to this brilliant post from David Fronk from Dynamic Methods Inc.. Applying his script to the entity's form through the onLoad event I was able to hide permanently a button. However I was looking for more!

I wanted to hide a button only if a specific field was filled. And how did I pull this one off? Simple! Just added the piece of code to the field's onChange event! It's important to keep the code in the onLoad event if you want to keep the button hidden when you save and close your entity and then reopen it.

2008-04-15

How to send HTML marketing e-mails

If you don't know exactly how to send HTML marketing e-mails I must warn you that it's really easy if you have basic HTML knowledge. Forget about MS CRM for a minute, write your own HTML code as you would if you were developing a webpage.
Then just copy and paste your HTML code into the field OFFER (Campaign) and then create a new campaign activity, select E-mail as your CHANNEL and then hit Distribute Campaign Activity. You should get something similar to this.

If you feel comfortable with HTML you can write your HTML code directly into the OFFER field as I did. If you want to include images don't forget to make them available through a public web folder. In this example I used the Google logo.

As you may also have noticed I hard coded the UNSUBSCRIBE e-mail address link. There is an explanation for that. Normally one would simply write a regular unsubscribe text and then select that text and hit the UNSUBSCRIBE button available when seting up the new e-mail activity. However if you set the FROM field to a Queue (as I did) your unsubscribe e-mail link will be broken to "mailto:[Run_Time_Address]?subject=[Run_Time_Subject]". After a lot of testing I gave up of this feature and decided to hard code the unsubscribe text/link. Doing this I'm also sure to include the unsubscribe text/link. I should warn you that the unsubscribe e-mail To should be the Queue's e-mail and the subject should be "UNSUBSCRIBE: E-mail Activity Subject". It's very important to match the UNSUBSCRIBE subject with the e-mail activity subject or the CRM won't be able to connect the unsubscribe request with the campaign in order to automatically create a campaign response and set sender's Send Marketing Materials = NO.

I will write a specific post about How to send e-mail campaigns from queues because I have some useful tips and tricks for you.

2008-04-14

How to Send E-mails from Queues


It's really very simple, just hit the lookup button after creating a new e-mail and change LOOK FOR "User" to "Queue". Then hit send and off you go. Don't forget you need the right CRM permissions for this (queues and send e-mail on behalf of).


2008-04-10

Duplicate Detection Rule Detects Phantom Contacts

I'm running a simple duplicate detection rule for contacs with the same e-mail address. I'm getting phantom duplicates: I get a duplicate (top list) but no potential duplicate record (bottom list). Instead of the bottom list I get this warning "Potential duplicate records: None". The image below shows a phantom duplicate: the selected active record has "Potential duplicate records: None".


After some investigation I realized that there was a previously deleted record (2 days ago) with the same e-mail. The deleted record exists only in the MS CRM DB and its DeletionStateCode equals 2! However my duplicate detection rule still sees him. I believe it shouldn't!

MSCRMAsyncService which as I read is supposed to handle the deletion of records ir running but doesn't delete anything... Very very strange!


I made a post about it at Microsoft Dynamics' Forums.

MS Dynamics CRM 4.0 Diagnostic Tool

Benjamin Lecoq has released the CrmDiagTool for CRM 4.0. You should read his post about it and download it from the link he provides.

By the way if you wish to enable tracing for MS Dynamics CRM 4.0 you should check the following KB article: http://support.microsoft.com/kb/907490.

2008-04-09

Facility/Equipment Import Wizard Issue

Whenever I try to import facility/equipment entities using the import wizard I get an error related with a missing column/attribute: "unmapped required columns: 1" (image below).



The missing column/attribute name is Calendar and the Reason states the following: "Error: unmapped mandatory column" (imagem below).


The "Calendar" attribute (image below) is a system required attribute of the Facility/Equipment entity and its description is the following: "Fiscal calendar associated with the facility/equipment.".

I haven't set my Fiscal Calendar yet because I read at the Implementation Guide that one can do it only once and in order to work with Sales Quota. I'm guessing I don't need to set it for now because when I mannually create a Facility/Equipment I don't get any kind of Fiscal calendar related error. I'm guessing I have to bypass this issue some how... I will post this at Dynamics Forums, perhaps someone already has been over this.

Travel Distribution Summit Europe'08

If you're in the travel/hospitality industry this is perhaps THE EVENT you can't miss. This event is composed by the Online Travel Strategies Conference, Revenue and Pricing Strategies Conference and CRM and Loyalty Strategies Conference. Click here to get an overview of the event and here toget and overview of the CRM and Loyalty Strategies Conference. Although all the conferences are appealing this last one is the one I'd like to attend. I'm waiting for clearance...

2008-04-08

c360 Import Manager for Microsoft Dynamics CRM 4.0

I have tried c360 Import Manager for Microsoft Dynamics CRM 4.0 and my feedback is positive. It works as it should and enables me to import, update and delete data in all standard and customized entities from my operational systems. It's quite simple to set up and use and I think it's worth the money if you're not comfortable regarding the use of CrmService or if you do not wish to develop code to perform imports, updates and deletes.

c360 has a more interesting products for MS CRM 4.0 such as c360 Event Management, c360 Field Level Security or even c360 Customer Portal but I haven't had the chance to test them.

2008-04-04

Fix Date and Birthdate/Birthday (for MS CRM 4.0 CrmService)

If you are using CrmService's Create or Update methods perhaps you already noticed that when you send a date in the DD-MM-YYYY HH:MM:SS format CrmService will read this date as MM-DD-YYYY HH:MM:SS and that's what he'll write to your MSCRM db.

So if you're writing a contact's birthdate/birthday like "24-07-1980 00:00:00" CRM will throw an exception because he's using "24" as MM and "07" as DD when he shouldn't. You need a workaround such as your own fixDate() method. The following fixDate() method was created by Marco Silva, member of my MS CRM Dynamics 4.0 project team of two (me and him). This method gets something like "24-07-1980 00:00:00" and returns it in a CRM friendly format "07-24-1980 21:00:00". If you check your MS CRM db you will see the correct date but perhaps not the correct time "24-07-1980 20:00:00".

private static string fixDate(String date)
{
string day = data.Substring(0, 2);
string month = data.Substring(3, 2);
string year = data.Substring(6, 4);
string hour = "21";
string min = "00";
string sec = "00";
return month + "-" + day + "-" + year + " " + hour + ":" + min + ":" + sec;
}

You may notice that we're forcing the hour, minutes and seconds and there's a pretty good explanation for that. The explanation is related with Time Zone handling issues that affect MS CRM 4 (and 3). My time zone settings (MS CRM server, SQL server, desktop) are all GMT (...Lisbon). Some specific datetimes (not all) are written to MS CRM DB with less an hour and that makes them go back one day.

If you send "24-07-1980 00:00:00" or "07-24-1980 00:00:00" to be more accurate to your CrmService it will write "23-07-1990 23:00:00" to MS CRM db! Ooops! Wrong birthdate! However if you check your contact's file you will see "24-07-1980". However the MS CRM db birthdate datetime is wrong ("23-07-1990 23:00:00") and you can't export it to an external db such as a datawarehouse. The workaround for this one requires two different approaches: a CrmService approach and an onSave approach (to fix typed birthdates).

Both of these workarounds require you to change birthdate's time to something bigger than "01:00:00" because if the CrmService "steals" you one hour it won't "steal" you a whole day! I chose to set "21:00:00" as my "fake" time. So, if I send this CrmService friendly "fake" date "07-24-1980 21:00:00" to CrmService he will write "24-07-1980 20:00:00" to MS CRM db! And that works for me as the birthdate time isn't important (or visible). So my first workaround also is solved by the fixDate() method above. The second workaround has to be properly included inside the onSave event which you have to enable.


This workaround was provided by Pedro Pereira who helped me fix this issue for MS CRM 3.0 but it works fine with MS CRM 4.0.

2008-04-03

Unwanted headache due to data type mismatch

First of all let me explain how my MS CRM Dynamics 4.0 system gets it's data.


Like any other company we have one big ERP/PMS that is our main data source and other small ERP/PMS systems. Most of this systems rely on MS SQL Server technology (2000 and 2005) for their database needs. This is great because it allows us to use SQL Server 2005 Integration Services (SSIS) to pump the data from each system's database and consolidate it to a single database. In the BI (Business Intelligence) world this process is called ETL or Extraction, Transformation and Loading. Although here we rely on the SSIS for the Extraction and Transformation phases and then we use CrmService webservice to send data to the CRM (create, update). Doing this we make sure our CRM and our ERP/PMS systems are automatically synched. Although this sounds very simple and you can learn it by yourself it really speeds up the process if you can get help from someone more experienced.


We are now developing the console application that will run in the background. This app will be responsible for retrieving data from the ETL databse and push it to the CRM using the CrmService webservice. For instance, we retrieve one contact (transformed) from our ETL database and then we push it to the CRM but first we need to know if the contact already exists there. Why's that? If the contact exists we use the Update method, if it doesn't we use the Create method. How to determine if he exists? Simple, choose a key field such as ERP/PMS customer number. This ERP/PMS primary key (PK) will act as a foreign key (FK) for our contact. If the contact is found we return the GUID and then call the Update method.


For more details about CrmService and it's methods I would advise you to take a look at Working with Microsoft Dynamics CRM 4.0 and Microsoft Dynamics CRM 4.0 Unleashed. This books are good starting points for learning how to use the CrmService. They are better used together as one has more details but fewer examples and the other has more examples and fewer details.



After some initial coding and successfull testing (retrieve data, push data) using the new much appreciated Visual Studio 2008 our problems began. Our last build of the console application crashed again and again and we didn't know why. Through debbuging we realized that it was a problem related with our RetrieveMultiple method call. After a couple of ours of nonsense coding we caught the bug: earlier we had changed an entity attribute from picklist to string (delete attribute, new attribute, save and publish), however our webreference (Visual Studio 2008) didn't reflect that change and we had to remove the web reference and add it again in order to "squish" the bug! This picture saved the day!



2008-04-02

Gmail or Google Apps and MS CRM Dynamics 4.0

I was wondering what kind of scenario one could build using Gmail/Google Apps e-mail and MS CRM Dynamics 4.0. After watching Michael Lu's video about POP3 (Gmail) and CRM queues I was sure that it would work for POP3 enabled Gmail/Google Apps e-mail accounts. However Gmail/Google Apps also offer support for IMAP connection and that's what I would like to test!

I setp up a Google Apps dummy e-mail and enabled IMAP connection under Settings > Forwarding and POP/IMAP.

Then I added the e-mail to a dummy AD user account. Great! Then I created a new CRM user for that user's AD account and I gave him a role (don't forget about the role!).

The next move was quite simple: logged in using the dummy AD user account and ran Outlook. I had to configure my e-mail IMAP account and for that I found this nice article explaining it all. It was quite interesting to watch my labels being displayed as folders in my IMAP folder.

I run a few tests: wrote an e-mail, sent an e-mail and everything worked as it should.

Next major step: configuring MS Dynamics CRM 4.0 Client for Outlook. I run the configuration wizard and I was done in no time.


Let's track an e-mail I thought! As I hit the Track in CRM button I got this familiar message: "Only items in the default Microsoft Outlook store can be promoted to Microsoft Dynamics CRM.". I had forgotten about this feature/issue. Workaround: move the e-mail to the default MS Outlook store and the promote it to MS and then promote it to MS Dynamics CRM 4.0. If your users can live with that... Mine can't! There is another workaround scenario that would imply the use of the MS CRM 4.0 E-mail Router (POP3) but that's what I was trying to avoid.

My advice for now is to forget about Google Apps/Gmail IMAP and MS CRM Dynamics 4.0 Outlook Client integration.