Monday, 9 December 2013

Crm 2013 – Upgrading from an ex-Crm 1.2 organisation


This post should only affect a small fraction of Crm 2013 users, but if you do have a CRM organisation that was first created in Crm 1.2, and upgraded through the versions to Crm 2013, you may get an “unexpected error” message when opening account contact or lead records that had been created in Crm 1.2 (I told you this wouldn’t affect many people, but we do still have, and interact with, customers from Crm 1.2 days).
The cause of this is the ‘merged’ attribute. Record merging (for accounts, contacts and leads) was introduced in Crm 3.0, and a ‘merged’ attribute was created to track if a record had been merged. For all records created in Crm 3.0 and higher, this attribute was set to false, but for records created in Crm 1.2, the attribute was null.

This causes a problem in the RTM build of Crm 2013. If you enable tracing, you will see an error like the following:
Crm Exception: Message: An unexpected error occurred., ErrorCode: -2147220970, InnerException: System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.Crm.BusinessEntities.RecordDisabledMergedNotificationGenerator.BusinessLogic(IBusinessEntity entity, IOrganizationContext context, NotificationAdder notificationAdder)

So, that’s the problem. There are three ways to fix it:
  • If you’ve already upgraded, then the quick, but unsupported, fix is via direct SQL statements that set the merged attribute to false (see below)
  • If you have not yet upgraded, you can merge each affected record in turn with a dummy record, which will set the merged attribute.
  • You can automate the merge process programmatically by submitting a merge request for each record, and passing appropriate parameters. I’m not sure if this will work after the upgrade, or only before, as I’ve not tried it
Unfortunately (but unsurprisingly), the merged attribute is not ValidForUpdate, so you can’t use a simple, supported update request to set the attribute

The SQL statements for an unsupported fix:

update contact set merged = 0 where merged is null
update account set merged = 0 where merged is null
update lead set merged = 0 where merged is null

7 comments:

kbs training institute said...
This comment has been removed by the author.
Tanu Tripathi said...

Thanks you very much for sharing. You always try to sharing such a good information with us. Online Lead Management System

ERP said...

We are ERPTREE Leading oracle fusion HCM Online Training institute. We are providing online training services since 1999. still we are adding more oracle related courses as the technology changes. 2000+ online courses are available. we all ways achieve our goal in satisfying students in result we have global recognition to our site. we have best faculty for all of our online courses.


Oracle Fusion Cloud HCM Training

Sophia said...

Hi,
Glad I found your site, this is an eye-opener for marketers. We are proud to be a solution provider for a diversified customer database, ranging from the small, medium technology firms to the giant multinationals. Generate more revenue with email marketing, b2b marketing, list solutions & market research services. Microsoft Dynamics CRM Users Email List

ERP said...

oracle fusion financials online training at erptree.com is worlds best online training center.
we have excelled in knowledge sharing through online. we have almost all country students as our subscribers for online course. 10+ years of experience we have in handling various ascent people. we have user friendly website where you will be provided with all the required details and Self-paced DEMO videos

Oracle fusion HCM Online Training

Calfre India said...

Oracle Fusion financials online training institutes is available at calfre.com, you just need to provide your interested coaching center location and course you prefer to learn with this information we can provide you the institutes list which are top rated in that particular area. thank you




Oracle Fusion Financials online Training

Oracle fusion Financials Trainin

Marianna Smith said...

Reading your article is such a privilege. It does inspire me, I hope that you can share more positive thoughts. Visit my site too. The link is posted below.
axadsystem.com/contact-us