Upgrade from CRM 2011 to 2013 fails with “Subquery returned more than 1 value. Not Permitted CRM 4.0″


We recently stumbled upon an issue when upgrading a customer from CRM 4.0 to CRM 2013. As is required, you must first upgrade the 4.0 database to 2011 and then from 2011 to 2013. The 4.0 to 2011 upgrade succeeded without error but threw an error when going from 2011 to 2013. 2013 was on update rollup 2. The error thrown was:

Error| Installer Complete: OrganizationUpgrader – Error encountered
14:56:47| Error| Exception occured during Microsoft.Crm.Tools.Admin.OrganizationUpgrader: Error.ActionFailed Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction
InnerException: System.Data.SqlClient.SqlException (0x80131904): Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.

The statement has been terminated.

We upgraded the database from 4.0 to 2011 one afternoon and then tried going from 2011 to 2013 the following morning. As it turns out, CRM 2013 contains a query that checks to see if an organization is a new organization or an upgrade by checking the CreatedOn field of the system solution. It does this by seeing if the CreatedOn date/time is within one day (24 hours) of the current time. If the CreatedOn date of the System Solution is within 24 hours, it is considered a new organization. Here is the query:

IF EXISTS (SELECT * FROM SolutionBase WHERE SolutionId=’FD140AAD-4DF4-11DD-BD17-0019B9312238′
AND CreatedOn >= DATEADD(day, -1, GETUTCDATE()))
BEGIN

(This query goes on to Update prvAppendToOpportunity depth to global on sales person role and update prvAppendToQuote, prvAppendToOrder, prvAppendToInvoice to local on sales person role.)

When the 4.0 database is upgraded to 2011, it sets the CreatedOn date/time to whatever the UTC date/time is of that upgrade. So when going from 2011 to 2013 it sees the new date/time resulting from the upgrade to 2011 and considers it a new organization and errors out on the above query. Below is the query that can be run to check the CreatedOn date of your 2011 database.

crmquery

The easy solution to this is to just wait 24 hours between the upgrade stages but if you are in a time crunch or minimizing down time for a go-live, you can update the CreatedOn date/time of the system solution directly in the 2011 database. Remember that the time is in UTC, changing the date back one day should be easier than trying to figure out the time difference in your time zone. However, keep in mind that updating fields directly through SQL is not a change supported by Microsoft so this is done at your own risk! Not sure if this issue is isolated to just Update Rollup 2 or if this occurs with 2013 RTM, Update Rollup 1, or Service Pack 1 yet.

Thanks to my young CRM Jedi Gage Pennisi for putting the details together!


Using Microsoft Dynamics CRM 2011 and Internet Explorer 10


Here’s one to make note of. With the introduction of Windows 8, IE 10 is quickly becoming the standard for desktop browsers, with IE 11 right around the corner with Windows 8.1 Release this fall.

As of Update Rollup 10, Microsoft Dynamics CRM 2011 is compatible with Internet Explorer 10 for the desktop in Compatibility Mode. For Update Rollup 12, or the December 2012 Service Update, Microsoft Dynamics CRM 2011 is compatible with Internet Explorer 10 for the desktop without Compatibility Mode.

Please Note: In both of the above circumstances, Internet Explorer 10 support is limited to the desktop browser mode, and does not apply to the touch version of the browser.

We get a ton of support tickets in how do I setup my IE 10 to work best with CRM 2011. Here’s
what you need to accomplish:

To change the Compatibility Mode of Internet Explorer 10, follow the steps below:

1. Right-click the top toolbar within Internet Explorer 10

2. Select to mark Menu Bar

3. Point to Tools and click Compatibility View Settings

4. Here, mark the Display all websites in Compatibility View checkbox or enter the specific CRM URLs under Add this website and click Add

Known Issues
Known issues that may be encountered when using Microsoft Dynamics CRM 2011 with Update Rollup 10 in Internet Explorer 10 for the desktop in Compatibility Mode:
•The dropdown list doesn’t expand if there is only one item in it. For example:

1.Logon to the Microsoft Dynamics CRM web application
2.Click Service and click Service Calendar. Make sure the type is Resource
3.Click the drop down list View
4.Notice that the list items do not expand

http://support.microsoft.com/kb/2743941


ADFS 2.1 Mex Endpoint Errors with CRM 2011 & Windows Server 2012. Here’s your fix.


When you install ADFS on a Windows Server 2012, the built-in ADFS role included is ADFS 2.1. When setting up Microsoft Dynamics CRM 2011 (UR13+ required), you will get an error message that tells you that IFD Authentication fails when trying to access the discovery service by external applications.

Apparently the documentation for update UR13 says this has been fixed, but not 100% true. There is still the manually steps shown below.

So, when you try to access this via your browser: https://crm.yourdomain.com/xrmservices/2011/discovery.svc?wsdl=wsdll, you will see within the XML a metadata node that contains the following:

<wsx:MetadataReference>

xmlns=”http://www.w3.org/2005/08/addressing“>https://adfs.yourdomain.local/adfs/ls/mex</Address>

wsx:MetadataReference>

Comparing that our Production CRM 2011 Server running on ADFS 2.0 you will see:

<wsx:MetadataReference>

xmlns=”http://www.w3.org/2005/08/addressing“>

https://adfs.yourdomain.local/adfs/services/trust/mex

Solution:

The current solution is to run the PowerShell script provided in http://support.microsoft.com/kb/2828015.

A power shell script will fix the problem with ADFS 2.1 having a known issue publishing metadata for mex endpoints. After configuring claims based authentication in Microsoft Dynamics CRM 2011, mex endpoints are not reachable.

Step 1: Start PowerShell Console

Step 2: Execute the Script contained in KB Article

Step 3: Either Restart both the CRM and ADFS Servers, or restart the ADFS Service, IIS on both machines.

Make sure with all ADFS adventures that your browser cache is clear.

The current solution is to run the PowerShell script provided in http://support.microsoft.com/kb/2828015.

My fellow MVP from down under, George Doubinski ran into this issue late last night, as has now offered to move from Australia, take up US citizenship just to vote for me if I ever decided to run for President!  Thanks George but I might be headed your way!

Update: here’s the new KB link for Windows Server 2012. I have confirmed this is fixed in ADFS 2.1
http://support.microsoft.com/kb/2827748


CRM 2011 Ribbon bar Missing after applying update Rollups? Here’s your fix.


A co-worker of mine was testing a CRM 2011 On Premise implementation where he had recently updated to rollup 12/13. He started to notice that the ribbon bar was completely missing!blankribbonbar

 

 

 

 

 

 

My first response was to clean out your cache, and try it from another machine, as well as use the IE Private Browsing Session. The IE private browsing session did help resolve the problem, but this was not the solution.

In reviewing some issues further, we found a blog from Ben Klopfer about a similar issue. Ben reported the permanent fix is:

Log in to CRM as an administrator.

  1. Go to Settings > Administration.
  2. Click System Settings.
  3. On the “Customizations” tab, uncheck Load pages in the most recent version of Internet Explorer.

After making the change, Ben’s fix works great and the ribbon bar is now available. Ben’s original blog can be found here: http://thinketg.com/dynamics-crm-2011-ru-12-blank-ribbon-issue-resolution/. Thanks Ben!

 

 


Geoflow, HotMaps via Excel 2013 Power Pivot. Add Dynamics CRM Data = WOW Factor for your Data and your Business!


GeoFlow originated in Microsoft Research, evolving out of the successful WorldWide Telescope project for scientific and academic communities to explore large volumes of astronomical and geological data. Researchers collaborated closely with the Office product team to usher GeoFlow from its research lab inception to this public preview availability in Excel. GeoFlow adds to the existing self-service Business Intelligence capabilities in Excel 2013, such as Microsoft Data Explorer Preview and Power View, to help discover and visualize large amounts of data, from Twitter traffic to Dynamics CRM 2011 sales performance to population data in cities around the world. Please remember this is still a beta, but works very well.

citychart

geoflow

GeoFlow Video

http://office.microsoft.com/en-us/download-geoflow-for-excel-FX104036784.aspx

Please note that CRM Online or IFD deployments are not supported at this time. As a workaround,


Update Rollup 13 – Self Healing .MSP Patch Location CRM 2011 Install on Windows Server 2012


Installing CRM 2011 on Windows Server 2012 requires to use the Microsoft Self healing Process – manual patch that you download from the Windows Catalog. I searched all over and had a hard time finding it. Thanks to my good friend Corey Hanson at Microsoft for providing a direct link to the patch. The patch is listed on the KB article under manual installation, but its a bit unclear for those looking for the Self Healing Patch.

http://catalog.update.microsoft.com/v7/site/Search.aspx?q=Setup%20Update%20CRM

Once you download the patch, add this to a directory on the CRM server. You will then run a command line install of CRM 2011 in order to have the installer use this patch. The CRM 2011 setup program will be updated upon release of Update Rollup 14, no longer requiring this manual patch for installing on Windows Server 2012. Instruction on how to create the configuration file and use the patch can be found here:
Example Sample Config.XML File – Save as XML – Do not save as TXT and rename.
 sampleconfig

Running from the command line:
commandline

Some more Gotchas:
Apparently, your must expand/unzip this file on a Windows 7 or Windows 8 machine, and then copy it over to the Windows 2012 Server. I kept getting messages that this patch will not work on this application and the serversetup.log file stated it was an invalid windows installer package.

2012installerror

 

Once I expanded (you can extract via right click too!) on my Windows 8 machine, and copied it over, everything worked like a charm.  This should save some people a few hours of scratching their heads..

Enjoy!


Microsoft Convergence 2013: ADFS Presentation


Please find my latest presentation on ADFS from Microsoft Convergence 2013. This presentation includes topics like SSL Certificates, DNS Entries, Firewall, Common Deployments, ADFS Proxy Servers, IFD, ADFS Installation, Tips and Tricks, Troubleshooting and ADFS Errors.

Please note the ADFS central link is not yet live on this site. This is the e-book I’m creating for ADFS installations. Stay tuned.

Download: ADFS Best Practices Presentation