Sunday, July 21, 2013

Definitive Guide to Installing Microsoft Dynamics CRM 2011 on Windows Server 2012

I see a lot of questions come across the forums about installing Microsoft Dynamics CRM 2011 on Windows Server 2012, which is now fully supported since UR-13 came out.  It seems that there are a lot of manual steps you have to take before you start to avoid getting halfway through the install only to have it fail partway through, requiring you to do an uninstall, fix the issue, and re-install.  This often times leaves extra AD groups and other things that need to be cleaned up afterwards so hopefully I can save you some trouble up front.

Here we go!  Let's start with the SQL Server Configuration.

SQL SERVER 2012 Install and Configuration

I am going to assume that if you are installing CRM on 2012 then you are probably using SQL 2012, which may not be true, but their isn't too many  differences in the SQL Server install, we will run through a few things anyways though.

1. When installing SQL Server, or after you installed SQL Server (you can add them after install), you will want to make sure you install a couple features on your SQL Server

- Full Text Indexing
- SQL Server Reporting Services - Native

2. You will want to specify a domain user for your reporting services service as in installs where SQL Server is broken out from the app server, only a domain user (not a local user) will work.

3. You will want to set SQL Server Agent Service to start automatically in SQL Server Configuration Manager

4. Take a moment and install the IIS web server role on your Windows Server installation to handle the web interface for SQL Reporting Services and host it's web services

5. SQL Reporting Services will not be configured out of the box, you will have to do that, we will take a moment and look at this.

   - Open Reporting Services Configuration Manager, it was installed
with the SQL Server feature install.
   - Click on the section for Web Service URL and accept the default values given, or configure your own.


   - Now click on database, follow the wizard and specify the database information and create your report server database.




CRM Service Accounts

There are several service accounts you will need to create to install CRM on Windows Server 2012.  This process is no different than what you needed to do for Windows Server 2008 so I will link you to the Technet document that provides all the specific information about the 4 different service accounts you need to create for your CRM install.

  -  Get the service account information here: http://technet.microsoft.com/en-us/library/hh699825.aspx 

    NOTE: If your account names are long enough that the domain\usernames names are truncated (pre-win2k standards)  in comparison to the user@domain.com username you have to use the domain\user truncated form for the service accounts when configuring CRM.  It will fail and will tell you the credentials are invalid immediately if you don't, so you may catch this on your own, but wanted to draw your attention to it.  :)

Configure the Update Patch

Since UR-13 Microsoft officially supports Windows Server 2012, but that doesn't mean that the current server installer supports it.  The web download installer is slip-streamed with UR-6 but that won't install on Windows Server 2012 without some configuration.

1. Create a Config.xml file in the same directory as your installer.
2. Go to http://catalog.update.microsoft.com
3. Search for ‘KB2434455’ and install the windows update catalog
4. Click Add for “Setup Update for Microsoft Dynamics CRM Server 2011”
5. Click View Basket
6. Click Download button
7. After download, un-zip the cab file for the 1033 version (if en-us) for your architecture and copy the              .msp file to a directory you will create called c:\temp (if it doesn't exist already)
8. Copy the following text to your Config.xml file
   
<CRMSetup>
<Server>
<Patch update=”true”>C:\TEMP\Server_KB2434455_amd64_1033.msp</Patch>
</Server>
</CRMSetup>
9.  Save the file
10. Do NOT run the CRM installer YET!

App Server Configuration on Windows Server 2012

Ok, now comes the really important stuff that will save you a ton of time by preventing uninstalls and reinstalls during this process.  There are several features you will need to install manually and maybe one you need to remove prior to your install.  Failure to do these steps will result in the installation starting but not completing successfully.  This will then require an uninstall and a re-install, so make sure you take care of all of these up front.

  - Install (Role) IIS role
  - Install (Feature) Windows Identity Foundation 3.5
  - Install (Feature) Windows Search Service
  - Install (Feature) 2.0 to 3.5 .Net Framework

We need to take a moment to elaborate on the last one Install (Feature) 2.0 to 3.5 .Net Framework. This isn't nearly as easy in many cases as it should be.  As it turns out it doesn't install the sources on the system and the ISO is required in some circumstances.  This makes it a little tougher.

Almost every time I try to install this I have to do it manually using the methodology here: http://www.danielclasson.com/install-net-framework-35-server-2012/

Essentially you have to use the dism tool via administrator command line and specify the source location on your source media.  It's pretty straight forward on Daniel's post linked above.

Starting the CRM Installer So It Uses Your Configuration File

1.  Launch a command prompt as administrator
2.  Run the CRM Installer with parameters to tell it to use your Config.xml file
        I.E.  C:\{CRM SetupMedia}\SetupServer.exe /config config.xml
3.  Setup will launch and you can continue.  It should state that Setup has finished downloading the    update!!!  This is important.  If it states that no update was available, something is wrong with how you  hooked up the update patch file and your config file.

Now you just need to follow the rest of the install process as usual.

Install Update Rollup 13 (or the newest) on the Server

Not much to say here, but here's the link to UR-13: http://www.microsoft.com/en-us/download/details.aspx?id=37133

Install SRS (SQL Reporting Services) Data Connector

This is installed on the SQL Server that also acts as your SQL Reporting Server for CRM (does not have to be the same SQL Server you use for your CRM Server SQL Server)

1. First install Windows Identity Foundation 3.5 from windows server manager from the features section
2. Now insert or copy your CRM media to/on your SQL Server (if not also your app server), and navigate to the CRM installation media and to the /SRSDataConnector folder.
3.  Run the installer as administrator and install the connector
4. Apply UR-13 for the SRS data connector to the same server.
5. Add your reporting services service credentials (can be found in services on the SQL Server or in Reporting Services Configuration Manager) to the PrivReportingGroup.
5. Restart the SQL Server that you are using as your SQL Report Services server.
6.  After your restart, access CRM and try to open an out of the box report, if it fails, you may see an rsItemNotFound error, but you may not.  If you do you need to publish the out-of-the-box reports manually.
7. If you do need to publish manually consult the quick blog here.  It has it laid out beautifully. http://mg--blog.blogspot.com/2011/05/report-is-not-getting-displayed-when.html


Items Not Covered
- Email Router (update to come)
- IFD



- I hope this helps!

Tuesday, July 16, 2013

Use CSV Files not Application Adapter to Migrate From Salesforce.com to Microsoft Dynamics CRM 2011 with Scribe Insight

I have done a couple migrations from Salesforce.com to Microsoft Dynamics CRM these days and this time I ran into a quick gotchas I thought I would point out.

Use exported .CSV's to migrate data using Scribe from Salesforce.com.  Save the Scribe application adapter for Salesforce.com ongoing integration with other systems.

There are two reasons for this, it is faster, and you won't bump up against the SFDC dreaded 24-hour API usage limit.

SFDC BUG:  In the .CSV exports when trying to migrate OpportunityContactRoles to the stakeholder connection in CRM I found a bug.  In the Scribe adapter you could  see the isPrimary boolean value to denote a primary contact on an opportunity, which is on the form.  This just wasn't there in the .CSV exports from SFDC.  I don't know if other entities have issues like this where certain schema elements are missing from .CSV data dumps, but it's worth noting.

- I hope this helps!




Wednesday, July 3, 2013

Microsoft Releases Visual Studio 2012 Update 3 Without Releasing the Corresponding Remote Debugger Tools ??

So, as some of you know I have been doing a lot of Windows 8 Windows Store App development for CRM lately.  As it turns out, the only way to debug specifically for an ARM device is to debug remotely by direct connection to the ARM device.

The instructions state explicitly that you need the same update version for your remote tools as you have for Visual Studio 2012 which presents a problem when Microsoft fails to release as Update 3 for the remote tools and repoint all of their download links to Update 3, making Update 2 virtually unavailable.

I finally found an ISO installer for Update 2 here: http://blogs.msdn.com/b/visualstudio/archive/2013/05/03/announcing-availability-of-isos-for-visual-studio-updates.aspx

-I hope this helps!

Friday, June 28, 2013

SSRS Prefiltering for Microsoft Dynamics CRM 2011 On-Premise in a Snap, The Simple Scenario That Most People Want.

I feel like I had to poke around way too hard to get the easy answer of how to prefilter SSRS reports the way I see it in the system.  This example uses SQL-Based FetchXML based reporting on CRM 2011 On-Premise

This allows you to:

  • Run a report on just the record you are in from the entity form
  • Run the report from a view on just the records in the view or just selected records within that view
  • Run Advanced Find style filtering on your report if just ran from the reports section.
There are two steps:


1. You need to modify your query to include a specific prefixed alias.  This signals CRM to pass in the context of the records and filtering to apply by parsing in a subquery.

An example query without pre-filtering:

SELECT accountid, name FROM FilteredAccount

The same query with pre-filtering enabled:

SELECT accountid, name FROM FilteredAccount AS CRMAF_FilteredAccount

So that's all you need to do at the report level to enable pre-filtering


2. When uploading the report, you need to choose the "Related Record Types"  and add Forms for related record types, lists for related record types to the "Display In"  section.



-I hope this helps!

Wednesday, June 26, 2013

Connecting to CRM 2011 Through iOS (initial thoughts)

There is a good chance that in the near future I am going to have to start writing some CRM 2011 connection stuff for iOS.  Also, someone on LinkedIn asked me today what my thoughts were.

Some initial ideas:

I don't write much Objective-C. We use Xamarin quite a bit at RBA, which allows us to write most of the app once (in C#) and then just re-write the UI layer for iOS or Android.

For the connection you can do a couple of different things. Depending on what the app is for, you can create a SOAP-based .NET web service to broker the connection and pass data back and forth, otherwise you can usually use something similiar to a SOAP-only client like the one that is here: 
http://code.msdn.microsoft.com/windowsdesktop/CRM-Online-2011-WebServices-14913a16 (again, this will only work if your underlying app is still C#)

Here's some other great general information and links on non-.NET client development.
http://msdn.microsoft.com/en-us/library/gg327838.aspx

Tuesday, June 11, 2013

Format of Jscript SOAP Responses in Microsoft Dynamics CRM 2011 Organization Service has Changed in UR 12!

You used to be able to pass in your response.responseXML.xml into a function like the one below to parse out a response and pull individual attributes.

function parseResponse(responseXML, attributename) {

    debugger;
    xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
    xmlDoc.async="false";
    xmlDoc.loadXML(responseXML);
    x=xmlDoc.getElementsByTagName("a:KeyValuePairOfstringanyType");
    for (i=0;i<x.length;i++)
   {
      if (x[i].childNodes[0].text == attributename)
      {
         //we decode the base 64 contents and alert the HTML of the Iframe
          alert(x[i].childNodes[1].text);
      }
      
   } 
}

PROBLEM:  With UR 12 and above you can still use this type of function but the responseXML property no longer exists on the response object.

SOLUTION: now instead of passing in your myresponse.responseXML.xml property of your response, now the property of your reponse is just in a  new response property, so the new syntax would just be myresponse.response

I hope this helps!!

-

Wednesday, May 22, 2013

Arrrggghhh!! Mind Blown!

Pretty sure my mind just blew.  Guess it's time to restart Visual Studio.  Errors get really funky when you have .xaml files open sometimes.  WOW!!

Name of client is blacked out.



Hope this gets a laugh or two!