Error while importing via Tools -> Import

Today I got a question regarding importing via the CRM Import tool (Menubar -> Tools -> Import). Only a small number of records would import, all the others would not. Even though the source seemed fine, they did throw this error:


0x80040328: Number of columns does not match the header row


This appears to be related to the source anyway. When you save an file in Excel 2003 as csv, it does the saving correct for the first records. Then after about 15 rows it starts to leave away the last splitter signs if the columns are empty! That does indeed end up in the error as shown above. The solution is to move one of the columns which does have data for all records in there, to the last column. Then again export the file to csv and do the import. You should now be able to import the records as expected.



Multiple Avanade clients win Pinnacle award

The Convergence 2007 Pinnacle Awards recognize, honor, and celebrate customers that have achieved outstanding success with their Microsoft solutions as well as Microsoft partners’ solutions. The three categories are Role Based Customer Awards, Excellence Customer Awards and Industry Leadership Awards.

One of Avanade's clients, Wellmark, has won the Industry Leadership Award for Healthcare. Another client, Haldex, has won the Overall Excellence Award. Especially the Overall Excellence Award is special because it recognizes a customer that demonstrates amazing efforts in multiple Pinnacle Award categories. Customers are not nominated in this category. The Pinnacle Award judging panel will choose the Overall Excellence Award recipient from the nominations received in the other categories.

Congratulations to the Wellmark and Haldex teams as well as to all the other winners of Pinnacle awards: http://www.msconvergence.com/public/pinnacleawards.aspx



Guest star on mscrm team blog

Jim Glass e-mailed me some time ago. This was the content:


Ronald, would you like to be the CRM Team blog guest blogger for February? You can select any work day in February.

Let me know what you think,

JaAG


Obviously Jim is a man of less words, but with these words he did make me a very happy person. I was personally invited to write a blog post for the number 1 blog around MS CRM. And today is the day that my article is published. So go ahead and read the article about the many possibilities of many-to-many relationships in MS Dynamics CRM 3.0!

http://blogs.msdn.com/crm/archive/2007/02/15/many-to-many-relationships-in-ms-dynamics-crm-3-0.aspx



CRM with a SQL Server Named Instance

Today I ran into Kale David's blog. He posted a solution for running CRM on a SQL Server Named instance. The main point is adding a DWORD key to the registery.
Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM\IgnoreChecks
Value: 1

See his blog for the full article.

Thanks Kale!



Territory manager cannot belong to other territory

If you're working with territories by using the SDK, you might get this error message:


0x80043805: Territory manager cannot belong to other territory


This happens if you want to make a specific user manager of two territories. This is possible, but you will have to make sure that the field 'territory' is set to NULL of this user. When you change the manager field of a territory by using the SDK, then the attribute territory of the user is changed as well. If you want to set this user as manager of the second territory, then you'd first need to clear this field.

Once again, I hope this saves you some time!



How to set the parent account via SDK

Last week I've been working on a migration application. One requirement in the application was to set the parent account of child accounts. It could be that a parent account has a parent account itself as well. So in my application I have followed this approach:
- For each account in the source, create an account in CRM 3.0
- For each account in the source, map the parent account to a crm accout and update the account in CRM 3.0

No big deal. This worked for the first thousands of accounts, but then suddenly an error message showed up:


<detail>
<error>
<code>0x80040237</code>
<description>Operation failed due to a SQL integrity violation.</description>
<type>Platform</type>
</error>
</detail>


After a lot of research and discussing with Luis Mazarío we found out in what situation this error occurres. It appeared that in some cases this error was thrown when the account already has subaccounts and I want to set the parent account. After even more research we found out that the source of this error was the code which I used to update the parent account. I was using a code like this:


Lookup lookup = new Lookup();
lookup.type = EntityName.account.ToString();
lookup.Value = gParentId;

account acc = service.Retrieve(EntityName.account.ToString(), gAccountId, new AllColumns());
acc.parentaccountid = lookup;
service.Update(acc);


Although it works most of the times, it is not the right code. This is the correct code:


Lookup lookup = new Lookup();
lookup.Value = id_parent;
lookup.type = EntityName.account.ToString();

account acc = new account();
acc.accountid = new Key();
acc.accountid.Value = id;
acc.parentaccountid = lookup;
service.Update(acc);


We're still digging a bit more on why the error occurred at all, but I hope this helps you!

Ronald



Uploading office 2007 (docx) files to CRM

On the newsgroups I've been talking to some people about uploading Office 2007 files. This appears to be not working as expected. There is a hotfix available for this issue now. Note: this hotfix is not included the rollup 1 package. Look at this page for more information: http://support.microsoft.com/default.aspx/kb/929488