Quantcast
Channel: Dynamics 365 Customer Engagement in the Field
Viewing all 458 articles
Browse latest View live

Kerberos in Load Balanced Environments

$
0
0

A very common topic we tend to get many questions on is delegation and troubleshooting delegation usually via one of the many topics that impact this: SPN’s, Kerberos, Load Balancers, 401 errors, etc. Many times detailed environment knowledge is required to make any conclusions, so rather than documenting a complex flowchart that covers every possible scenario, I am going to draft up a fairly common environment and document the various steps required to make sure Kerberos is working for that environment. Kerberos only works properly when everything is setup correctly, so troubleshooting issues can be very frustrating and time consuming. If there is any one issue in the chain, authentication will fail and give you errors like: 
      “Login failed for user: NT AUTHORITY\ANONYMOUS LOGON”
      “Login failed for: NT AUTHORITY\SYSTEM”
      “HTTP Error 401.1 – Unauthorized: Access is denied”
If you’re troubleshooting one of these issues I suggest reading through all the steps in this article and verifying your configuration, then move on to the troubleshooting section.

A few notes regarding this post:

  • These concepts apply to any web applications/services that are referenced by a name other than their computer name in Active Directory (regardless of a physical load balancers presence), in this example I’m using Dynamics CRM as the web application
  • For other Kerberos specific questions I suggest reading the “Kerberos for the busy admin” blog article on the AskDS blog.
  • Kerberos authentication is required if you are persisting a user’s credentials or delegating the user’s credentials through more than 1 hop (this scenario is commonly referred to as “double hop”)
  • For the purpose of demonstration I am illustrating unconstrained delegation. Constrained delegation is an optional way to define which SPN’s allow delegation of credentials (essentially a more specific mapping for delegation).
  • For information on CRM 2011 setup and questions on splitting roles and distributing services for better scaling please refer to my other blog post titled: “Server Setup Frequently Asked Questions” (http://bit.ly/CRMSetupFAQ).
    • In addition the FAQ article includes information about the MSCRMSandboxService SPN which may be required depending on your configuration.

This post has the following assumptions:

  • CRM 2011 is installed on your CRM servers: NDCRMSrv1, NDCRMSrv2, NDCRMSrv3
  • CRM 2011 is installed to databases located on the SQL Server: NDSQLSrv1 (this is for the purpose of demonstration only, CRM does support using multiple SQL servers to host the various CRM databases)
  • SSRS 2008 (or R2) is installed on your reporting servers: NDRPTSrv1 and NDRPTSrv2 and these servers are configured in a Scale-Out deployment (using the same SSRS configuration databases) instructions are here:  http://bit.ly/UhjK2a
  • You have access (or have a process) to request changes or make changes to Active Directory
  • You have not set any SPN’s for these services in your environment and you have no duplicate SPN’s for these services or host machines.
  • Your domain functional level is 2003 or greater
  • You are using Active Directory integrated authentication for Dynamics CRM.

KerberosGraphic_thumb1

  

1) Service Principal Names (SPN’s):

First thing we want to focus on is setting our SPN’s correctly. A service principal Name (SPN) is a way to map identities in Active Directory to various services (SQL, HTTP, etc) hosted in your domain. This mapping is an essential part of issuing and decrypting Kerberos tickets within your environment. Below, in the troubleshooting section, you can see how a workstation will ask your DC’s for a Kerberos ticket via the service name which, for HTTP services, is determined by the URL of the service.

If you run into any scenarios where you believe there must be duplicate SPN’s you’re most likely trying to use more than one identity to host a single service. For example: you’ll notice in the above graphic that we’re hosting the CRM services under the hostname crm.contoso.com and with a single identity: contoso\CRMWeb. If you wanted to add a second website which would use a different port and a different identity, but would use the same URL, you have two options: 1) use a different hostname/URL to differentiate the services 2) register the SPN’s using a port number to differentiate them.

To configure the SPN’s I recommend mapping out all the various services you’re hosting. For HTTP services you’ll also want to map out the URL’s used to access the service*, for this example we have the following potential URL’s:

Potential CRM Service URL’s: Potential Report Service URL’s:
- http://crm
- http://crm.contoso.com
- http://ndcrmsrv1
- http://ndcrmsrv1.contoso.com
- http://ndcrmsrv2
- http://ndcrmsrv2.contoso.com
- http://ndcrmsrv3
- http://ndcrmsrv3.contoso.com
- http://reports
- http://reports.contoso.com
- http://ndrptsrv1
- http://ndrptsrv1.contoso.com
- http://ndrptsrv2
- http://ndrptsrv2.contoso.com

*NOTE: there has been some debate on the need for registering both the Fully Qualified Domain Name (FQDN) SPN as well as the netbios name SPN, generally speaking, I’ll register both just to make sure all bases are covered. In addition, if users will only be using the “friendly” url or alias (in this instance: http://CRM) then registering the SPN’s for each server is not required – but if you plan on using the server names to access the web services (even if it’s for testing) it’s a good idea to register those as well.

Next, you’ll want to construct a table of the various services that will require an SPN. Please note: if you had more than one SQL server or any custom web applications or web services that use different URL’s those should also be added to this table.

Identity/User Hosting the Service Service Type

Service Principal Name(s)

CRMWeb@contoso.com HTTP

http/crm
http/crm.contoso.com
http/ndcrmsrv1
http/ndcrmsrv1.contoso.com
http/ndcrmsrv2
http/ndcrmsrv2.contoso.com
http/ndcrmsrv3
http/ndcrmsrv3.contoso.com

reportService@contoso.com HTTP

http/reports
http/reports.contoso.com
http/ndrptsrv1
http/ndrptsrv1.contoso.com
http/ndrptsrv2
http/ndrptsrv2.contoso.com

SQLService@contoso.com MSSQLSvc MSSQLSvc/NDSQLSrv1.contoso.com

*NOTE: HTTP is used to identify an SPN as an “HTTP” service, this holds true for both SSL and non-SSL HTTP services. If you are registering any SPN for a web service (SSL or not) the SPN will begin with HTTP. 

2) Registering the SPN’s:

Now that we have a full list of all the SPN’s we’re going to set them up in Active Directory. The easiest way to set an SPN is to use the SetSpn utility in Windows. You will have to have elevated permissions to add SPN’s in Active Directory. The syntax to use for adding the above SPN’s is as follows: SetSpn –S {spnToAdd} {AD Object}. An example of adding the crm.contoso.com SPN and the SQL SPN would be:
  - SetSpn -S HTTP/crm.contoso.com contoso\crmweb
  - SetSpn -S MSSQLSvc/NDSQLSrv1.contoso.com contoso\sqlservice

Repeat this process for each SPN, I’ve found it helpful to have an Excel spreadsheet of my SPN’s and account names and check them off as I add them. You’ll notice that I’ve documented using –S instead of –A, –S is a new option that is used to check for duplicates before adding the SPN – if there are duplicates you’ll receive an error and the SPN will not be added. 

3) Configuring CRM’s IIS Server for Kernel Mode Authentication:

IIS 7 and 7.5 can take advantage of Kernel Mode authentication and CRM configures it’s website to use it. Kernel Mode auth is desired as it improves authentication performance and prevents authentication problems with application pools using custom identities. However, when using a host name that does not match the server name(s) we need to tell IIS to use the Application Pool’s identity (as it’s common on all your servers) and not the system identity this allows the Kerberos tickets to be decrypted by any server behind the load balancer. To do this we’re going to set the UseAppPoolCredentials property in the IIS configuration.

Check the value of the webservers WindowsAuthentication configuration
%systemroot%\System32\inetsrv\appcmd.exe list config -section:system.webServer/security/authentication/windowsAuthentication
image_thumb[132]

Set “UseAppPoolCredentials” in the webservers configuration file:
%systemroot%\system32\inetsrv\appcmd.exe set config -section:system.webServer/security/authentication/windowsAuthentication -useAppPoolCredentials:true /commit:apphost
image_thumb[133]

3.1)Kerberos Auth Persistence (optional)

Configuring persistence of Kerberos credentials will reduce the challenge/responses on the same TCP session resulting in fewer 401’s and better performance. If you analyze a Fiddler trace of communication between the user and the server you’ll notice that most successful responses from a webserver are proceeded by at least one 401, even when the requests are for the same TCP session between the client and server. By setting the AuthPersistNonNTLM property to “true” the webserver will persist the credentials of the user over the existing TCP sessions – dramatically reducing the number of 401’s for the user. If you’re looking in Fiddler you will also notice a Persist-Auth header in the response indicating auth was persisted for that request. If you’re interested in another tweak for better performance through compression of WCF traffic be sure to check out this blog posting: “Enable WCF Compression to Improve CRM 2011 Network Performance

Check the value of the webservers WindowsAuthentication configuration
%systemroot%\System32\inetsrv\appcmd.exe list config -section:system.webServer/security/authentication/windowsAuthentication
image_thumb[134]

Set “authPersistNonNTLM” in the webservers configuration file:
%systemroot%\system32\inetsrv\appcmd.exe set config -section:system.webServer/security/authentication/windowsAuthentication -authPersistNonNTLM:true /commit:apphost
image_thumb[135]

4)Configure your accounts to allow for Kerberos Delegation:

To make sure delegation will succeed in any given environment there are a couple of settings that must be in place before delegation is allowed.

  1. Any services that persist credentials must be allowed to delegate in Active Directory. For this example, we must enable the CRMWeb account to delegate. To do this
    • login to a server with credentials allowing you to edit the given service account
    • Open Active Directory Users & Computers (from the run box type: DSA.msc and press Ok)
    • Click on the root of your domain (in this case it would be Contoso.com)
    • Click on the Find button in the toolbar of Active Directory Users & Computers: image_thumb[137]
    • Find your service account (CRMWeb) and open that objects properties
    • Click on the Delegation tab (this will only show up once the account has an SPN registered – otherwise it is hidden)
    • Make sure to “Trust this user for delegation to any service (Kerberos only)
      image_thumb[142]
      NOTE: if you wish to implement constrained delegation you would select Specified services only and select which SPN’s to use. I recommend setting up unconstrained delegation first, then constraining it after you’ve verified that it works

5) Troubleshooting:

  • Clock Skew – this is an illusive cause and is so obvious it’s often overlooked.  If any of the servers communicating are more than 5 minutes (Default – the policy name is: Maximum lifetime for user ticket Kerberos Policy), if the servers are out of time sync then you can get the same Kerberos errors documented in this article.  On a side note, this one has burned me several times, make this your first check just in case – maybe you’ll get lucky and this will be your silver bullet 🙂
  • Client Browser IE Configuration: Double check Internet Explorer for the “Enable windows authentication” option:
    • image_thumb1
  • How you access CRM: Kerberos authentication cannot function without connectivity to a domain controller, thus if you are accessing over the internet Kerberos auth will likely fail unless you’re on a VPN or on your corporate network. If you’re accessing CRM over the internet, CRM has a configuration specifically designed to work over the internet called “Claims Based Authentication with Internet Facing Deployment (IFD)”.
  • Check your SPN’s – Windows Server 2008 now includes SetSPN which can be used to list the SPN’s. No special permission should be required to read these SPN’s. For example: to check the CRMWeb account for SPN’s open a command prompt and type the following: setspn –L contoso\crmweb. This will list all the SPN’s found under the CRMWeb account.
  • Event Logs: Check your servers and client System & Security event logs. The System log can contain errors from KDC or Kerberos which might contain useful information and sometimes you’ll find useful failed audit entries in the Security log (be careful with these as they can be benign as well). If this doesn’t yield any results also check the Global Catalog domain controller System Event logs for KDC errors.
  • Check DNS: For each server (CRM, SQL, reports, etc) run nslookup and make sure you get the correct IP address, in addition make sure the reverse lookup is working as well (ie: nslookup {ip} should return you the correct host name).
  • Active Directory Replication: As mentioned above, the SPN’s are stored in Active Directory. If Active Directory replication is delayed or broken the SPN’s will not replicate and you can get inconsistent results. I suggest first checking with your Active Directory admin and having them check replication status and the NTDS logs. If necessary you can use a tool like LDP.exe to bind to each global catalog and check for the SPN’s, but this can be time consuming.
  • Netmon: Capture a netmon trace from your client
    • Close all of your Internet Explorer browsers
    • Start netmon 3.4 and press the New Capture button. Once the new capture tab appears, press the Start Capture button
    • From the run box on your computer type in your server URL: http://crm.contoso.com (for this example)
    • Once the prompt appears stop the netmon capture
    • Enter the following into the “Display Filter” box: KrbError (see in the graphic below)
    • Then press the “Apply” button in Display Filter box to filter your Frame Summary
    • Within the Frame Summary window click on the Kerberos Errors displayed. The frame summary should show you the DC name or IP that responded to the request as well as the error:

NetmonKerbError_thumb1

    • In the Frame Details expand the KRB_ERROR to view the details of the error, this shows exactly which service name failed along with the realm info and other details. In this scenario you would see a failure for the service HTTP/crm.contoso.com or HTTP/crm depending on how you entered the URL into the browser. This Kerberos error is telling you that it cannot find a suitable Service Principal Name matching the service.
  • Enable Kerberos Event Logging on the server and on your client, you will likely see an error of: “KDC_ERR_PREAUTH_REQUIRED” or “KDC_ERR_S_PRINCIPAL_UNKNOWN” when you attempt to login. Please keep in mind that enabling Kerberos event logging will show you benign errors as well as valid errors to investigate, so I recommend only doing this to validate other errors or once you’ve exhausted other techniques.
  • User delegation blocked. If you have a user that is constantly prompted but other users are not prompted
    • login to a server with credentials allowing you to edit the given user account in Active Directory
    • Open Active Directory Users & Computers (from the run box type: DSA.msc and press Ok)
    • Click on the root of your domain (in this case it would be Contoso.com)
    • Click on the Find button in the toolbar of Active Directory Users & Computers: image_thumb[143]
    • Find the account and open the properties for that user
    • Click on the “Account” tab and make sure the following checkbox is unchecked
      image_thumb[144]
  • Check for duplicate SPN’s:
    • Please remember, all SPN’s must be unique, if you register a duplicate SPN then neither will function properly (SPN’s are case insensitive). There are a couple of techniques you can use to check for duplicate SPN’s, I’m going to focus on the use of Windows Server 2008’s version of SetSPN. There are two approaches to checking for duplicates using SetSPN:
      1. Check for any duplicate SPN’s for the entire forest – this is a very handy option but in true enterprise environments this can take some time to run and can consume a lot of memory. To do this you run the following command at a command prompt:
        SetSpn.exe –X
      2. Search for a specific SPN across the domain for duplicates. For example, if I wanted to search my domain for any duplicates of the SPN HTTP/crm.contoso.com I would use the following syntax:
        SetSpn.exe –Q HTTP/crm.contoso.com
  • Use DelegConfig to test Kerberos Authentication and setup: http://bit.ly/PX2b1X 

As always I’ll do my best to keep up with comments. If you want to keep in touch with our team you can follow us here (http://blogs.msdn.com/CRMInTheField) as well as on Twitter, if you have a Microsoft Premier support contract and wish to work with a member of our team ask your TAM about the PFE offerings we have for Dynamics CRM, and if you want to connect with us at conferences we can be found speaking and attending Dynamics Convergence. We’ll keep any other events or opportunities to connect up to date here and on Twitter.

Thanks!

Sean McNellis


Microsoft Dynamics CRM 2011 Update Rollup 10 Re-released

$
0
0

You may have noticed that the Update Rollup 10 build number was incremented on the Microsoft Download Center page for Microsoft Dynamics CRM 2011 Update Rollup 10. This is because the Update Rollup 10 packages were re-released on 10/4/2012. The original build number of Update Rollup 10 was 5.0.9690.2730. The build number of the re-release is 05.00.9690.2740. The new packages include "v2" in the title, i.e. CRM2011-Server-KB2710577-v2-ENU-amd64.exe, etc.

General guidance regarding this re-release:

  • If you plan to go to Update Rollup 11 (description available via http://support.microsoft.com/kb/2739504 now) then do so when it is available. You don't need to install the Update Rollup 10 re-release unless you're impacted by any of the issues listed below
  • If you plan to stay on Update Rollup 10 for a while, install the UR 10 re-release as soon as possible.
    • You should have the re-released Update Rollup 10 installed by the end of calendar year 2012
  • Release of the Update Rollup 10 re-release to CRM Online is expected to begin, using a phased approach, the week of Oct. 8th, 2012

Fixes released in the Update Rollup 10 re-release are few, and include:

  • Missing LocalizedLabel record for new SavedQuery
  • JavaScript editor limited to 2000 characters
  • CRM Outlook crash when configured to use SQL CE 4.0
  • DialogArguments reference in Outlook Client Modal Dialog Causes Memory Leak
  • Two entries inserted into ActivityPointerBase when reply to a tracked email
  • Unable to add a sales literature to Custom entities
  • SQL timeout on Security roles when importing Managed Customer Solution
  • After installing Update Rollup 10 Client, Outlook users may experience error "An error has occurred."

Greg Nichols

Microsoft Premier Field Engineering

Cleaning up CRM Sync Entry tables

$
0
0

UPDATE: DYNAMICS CRM 2011 UPDATE ROLLUP 15+ AUTOMATICALLY CLEANS UP SUBSCRIPTIONS OLDER THAN 90 DAYS – if you are running on CRM 2011 Update Rollup 15 or higher you DO NOT need to use this script.

If you’re CRM system has been up and running for a long period of time and your users have the CRM Outlook client installed (or have had it installed in the past) you’ll find many tables starting in SyncEntry_ as well as SubscriptionStatistics_ in your database. These tables are used to track items that are synchronized down to users client machines, however, when users get new client machines or leave the company the tables are left behind indefinitely.  This script has become a cleanup step we run with our customers prior to upgrading or periodically to prune out old sync data.  

Important NOTES about this script:

  • Always make a backup before running this script against your DB. 
  • Running scripts that modify your database are not supported, thus we’ve gone to great lengths to test this and make sure that all entries are cleaned out.  As of today this script can successfully run on:
    • CRM 4.0 UR7 and greater
    • CRM 2011 RTM through CRM 2011 Update Rollup 8
  • Do not modify any parameters or joins in this script or you could risk data damage
  • The script currently deletes all sync data older than 90 days
  • If a users sync entry data were to be deleted, the next time the user attempts to sync their client, the data would be rebuilt automatically
  • To test the script you can edit the “SET @execute = 1” and set it to a “0”, this will allow the script to run in a read-only mode and print out the SQL statements it would run to delete the tables.
Declare 
      @SyncEnt    varchar(60),
      @syncId     uniqueidentifier,
      @SQL        nvarchar(MAX), 
      @execute bit

--To run the deletions set this to 1, if it is 0 it will only print the statements
SET @execute = 1 

DECLARE CRMSync_cursor CURSOR FOR

SELECT Replace(SyncEntryTableName,'SyncEntry_','') as SyncEntryGUID, SubscriptionId from subscription 
where LastSyncStartedOn < GetDate()-90 or LastSyncStartedOn is NULL

OPEN CRMSync_cursor
FETCH NEXT FROM CRMSync_cursor INTO @SyncEnt, @syncId
WHILE @@Fetch_Status = 0
BEGIN
      IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID('subscriptionStatistics_'+@SyncEnt) AND type in (N'U'))
      BEGIN
            SET @SQL = 'DROP TABLE SubscriptionStatistics_' +(@SyncEnt)
            IF @execute=1 EXEC sp_executesql @SQL
            IF @execute=0 PRINT @SQL
            IF @execute=1 PRINT 'Dropped table: SubscriptionStatistics_'+(@SyncEnt)+ ' with error: ' + CAST(@@ERROR as varchar(255))
      END
      ELSE
            IF @execute=1 PRINT 'SubscriptionStatistics table does not exist for subscriptionID: ' + CAST(@syncId as varchar(50))
      
      IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID('SyncEntry_'+@SyncEnt) AND type in (N'U'))
      BEGIN
            SET @SQL = 'DROP TABLE SyncEntry_' +(@SyncEnt)
            IF @execute=1 EXEC sp_executesql @SQL
            IF @execute=0 PRINT @SQL
            IF @execute=1 PRINT 'Dropped table: SyncEntry_'+(@SyncEnt) + ' with error: ' + CAST(@@ERROR as varchar(255))
      END
      ELSE
            IF @execute=1 PRINT 'SyncEntry table does not exist for subscriptionID: ' + CAST(@syncId as varchar(50))
      
      SET @SQL = 
            'delete from SubscriptionManuallyTrackedObject where subscriptionId = ''' + CAST(@syncId as varchar(50)) + ''';' +
            'delete from subscriptionclients where subscriptionId = ''' + CAST(@syncId as varchar(50)) + ''';' +
            'delete from Subscriptionsyncinfo where subscriptionId = ''' + CAST(@syncId as varchar(50)) + ''';' +
            'delete from subscription where subscriptionId = ''' + CAST(@syncId as varchar(50)) + ''''
      IF @execute=1 EXEC sp_executesql @SQL
      IF @execute=0 PRINT @SQL
      IF @execute=1 PRINT 'Dropped subscription table data for subscriptionId: ' + CAST(@syncId as varchar(50)) + ' with error data: ' + CAST(@@ERROR as varchar(255))
      FETCH NEXT FROM CRMSync_cursor INTO @SyncEnt, @syncId
END
CLOSE CRMSync_cursor
DEALLOCATE CRMSync_cursor

When the script runs you’ll be left with output such as the following showing you what was deleted and if there were any errors:

Dropped table: SubscriptionStatistics_6e64fbf450a1de11932b00155d88bd02 with error: 0
Dropped table: SyncEntry_6e64fbf450a1de11932b00155d88bd02 with error: 0

(0 row(s) affected)

(0 row(s) affected)

(766 row(s) affected)

(1 row(s) affected)
Dropped subscription table data for subscriptionId: 6E64FBF4-50A1-DE11-932B-00155D88BD02 with error data: 0

Using Fiddler To Check For Kerberos Auth

$
0
0

Frequently I see customers trying to verify if their Kerberos settings (http://bit.ly/QOEvLF) are truly working or not.  In the past we’ve used tools such as NetMon, Kerbtray, Klist, and others to verify this however, recently I found a very simple way to test if Kerberos auth is working or not using Fiddler – a very common utility that many admins already have loaded on their client machines. Here are the steps:

  1. Download and install fiddler on the client machine: http://www.fiddlertool.com/
  • This test process only applies to machines external to the servers hosting the services.  In the case of CRM, you would run fiddler from a client machine and not from a CRM or SQL Server.
  • Open Fiddler on the client and start collecting data (Fiddler starts collecting by default)
    • If you have SSL enabled (HTTPS) on the website your testing make sure to enable Fiddler to Decrypt SSL, this can be done by clicking the Tools Menu, then Fiddler Options, then click the HTTPS tab, then select the “Decrypt HTTPS Traffic” checkbox.
  • Access the site you wish to test (your CRM site), make sure you’re using the website alias or the way users will access your site. 
  • In the left hand pane of Fiddler, which show’s all the requests, find one of the first successful (200) requests to the server in question and click on that request.
  • In the upper right hand pane of Fiddler click on the Inspectors tab, then in the “Request Headers” area click on the “Headers” option as show below.
    • image_thumb2
  • Within the “Request Headers” box look specifically for the “Cookies / Login” section of the headers, it is in this area you’ll see the Authorization. You should see one of two patterns that will tell you if you’re communicating with Kerberos authorization or not. If you see the Authorization token begin with “YII” Kerberos is functioning, if you see “TlR” then Kerberos did not function – here are images of each scenario:
    • Kerberos working: image_thumb5
    • Kerberos not working: image_thumb16
  • If you were expecting to see YII and see TlR instead, please take a look at my other blog posting (http://bit.ly/QOEvLF) covering the setup and configuration of SPN’s and Active Directory properties to allow for proper Kerberos authentication. Also, once Kerberos is functioning I recommend taking advantage of IIS’s AuthPersistNonNTLM setting to reduce the number of 401 challenges – this is also covered in the Kerberos blog posting under section 3.1.

    If you want to keep in touch with our team you can follow us here (http://blogs.msdn.com/CRMInTheField) as well as on Twitter, if you have a Microsoft Premier support contract and wish to work with a member of our team ask your TAM about the PFE offerings we have for Dynamics CRM, and if you want to connect with us at conferences we can be found speaking and attending Dynamics Convergence. We’ll keep any other events or opportunities to connect up to date here and on Twitter.

    Thanks!

    Sean McNellis

    CRM Upgrade Best Practices

    $
    0
    0

    Updated on 8142013 – I removed the NumThreadsForIndexCreation registry key as there was an update rollup that removed the significance of that registry key and your organization importupgrade will actually fail if you use this NumThreadsForIndexCreation now.  We have this documented in KB 2714807.

    Sean McNellis, Ryan Anderson and I recorded a podcast (https://aka.ms/tndfbt) last Friday on Dynamics CRM Upgrade Best Practices.  During the podcast we mentioned that we would be posting a blog article outlining the topics that we covered with links to more details.  That podcast and this blog post are by no means all encompassing upgrade best practices, but are just meant to cover some of the common topics and practices that we have been doing with our premier support customers.

    Preparing for the Upgrade

    • Reasons to upgrade to CRM 2011– We started out talking a little bit about this as your organization prepares for the upgrade to CRM 2011 there are lot of resources available online. 
    • Installation Media – Ensure that you have the CRM install media with Update Rollup 6 slipstreamed.  The version should be 5.00.9690.1992 if you right click on SetupServer.exe and go to Properties | Details.  I always use Greg Nichols post on our blog to get the updated download links.  https://aka.ms/jwfeje
      • This setup includes Update Rollup’s 1-6 as well all all the setup updates for Dynamics CRM 2011.  This version is also required if you are planning to deploy to SQL 2012.
    • CRM White Papers and other Technical Documents
      • Recommended White Papers
        • CRM 2011 Implementation Guide
        • CRM 2011 Optimizations
        • CRM 2011 SDK
        • Deploying CRM 2011 from Development to Test and Production environments
      • Complete list of white papers with links: https://aka.ms/aiiriw
    • There are 3 types of upgrades – When upgrading you can choose between 3 different upgrade paths.  The path you choose will vary depending on your current CRM infrastructure and your plans for your CRM 2011 production environment.  We almost always recommend going with the Migration Upgrade approach as it provides the ability to test the upgrade multiple times, allows for performance benchmark testing and leaves your existing CRM 4.0 environment in tact in case a rollback is necessary. Most of our customers are using NLB and have an alias record setup in DNS which is pointing to the CRM 4.0 environment.  The IP address on that alias in DNS is all that you would have to update once you decide to go live with your upgraded CRM 2011 environment in order for web and Outlook (Assuming you configured using the alias name which is also always recommended) to be pointed at CRM 2011.

     

    Server Optimizations – Prior to Upgrade

    Registry keys on the CRM server that we recommend implementing for the CRM upgrade.

    Registry Key

    Value

    Post Upgrade

    MaxUserPort -  https://aka.ms/dims52

    65534

    Leave in place

    TCPTimedWaitDelay - https://aka.ms/xhts4r

    30

    Leave in place

    OLEDBTimeout - https://aka.ms/yc14kw

    86400

    Set back to previous value or delete key

    *EnableRetrieveMultipleOptimization - https://aka.ms/bcii0b

    0

    Leave in place

    MaxDopForIndexCreation - https://aka.ms/kw0kzz 4 Delete
    SortInTempDB - https://aka.ms/kw0kzz 1 Delete
    NumThreadsForIndexCreation - https://aka.ms/kw0kzz 4 Delete
    BatchAddAttributeUpdates - https://aka.ms/kw0kzz 1 Delete

    * We used to recommend setting the EnableRetrieveMultipleOptimization to 2 or 1 for most of our customers with millions of records in the PrincipalObjectAccess table, but now with the UR10 optimizations we are recommending that customers set this to 0 or delete the key as CRM dynamically sets this now based on your dataset.

    • Enable AuthPersistNonNTLM
      • After you set the authPersistNonNTLM property to True, you do not require a reauthentication for every request that is made over the same keep-alive connection.  This will help to reduce the number of 401 requests that the CRM server receives and help reduce unnecessary traffic.
      • Please refer to the following KB for complete details for checking and enabling this: http://support.microsoft.com/kb/954873
      • Sean McNellis also wrote a blog post on Kerberos in Load Balanced Environments which also has details and screenshots on checking if this is enabled and commands to enable authPersistNonNTLM
    • Remember to Set “UseAppPoolCredentials” in the webservers configuration file
      • This is something that I have run into multiple times with our premier customers who are using NLB setups and running the CRM Application Pools as a domain user with Kernel Mode authentication enabled.  You must do this extra step or your users will be prompted for credentials andor get a 401 error message when trying to access CRM.
      • Sean details how to check for and set this up in IIS in his Kerberos blog post as well.  https://aka.ms/hw3vzw
    • Enable WCF Compression
      • Enabling WCF Compression can greatly help to improve the CRM 2011 network performance in your environment.  Especially when using the CRM 2011 Outlook client. 
      • Jeremy Morlock on our PFE team has written a great blog article on the benefits of WCF compression and also how to enable this in CRM 2011.  https://aka.ms/may2aj

     

    SQL Server Settings – Prior to Upgrade

    • Run the SyncEntry clean up scripts- If your users are utilizing the CRM Outlook client to clean up old sync entry tables.
    • Run the Async clean up script– The AsyncOperationBase table can grow to be very large and degrade performance overtime, so clean this up prior to upgrading.
    • Change the database backup model to SIMPLE Recovery Model- After restoring the database backup on the new CRM 2011 SQL instance we recommend changing the recovery model to Simple.  This will help reduce the amount of data logged to the SQL database transaction logs during the upgrade process and can help prevent issues with running out of drive space on the disk that the transaction logs are stored on.
    • SQL Max Degree of Parallelism
      • You can use the max degree of parallelism option to limit the number of processors to use in parallel plan execution.  In the past we have always recommending customers setting the Max Degree of Parallelism to 1 on the SQL instance that hosts the CRM databases.  However, with the larger SQL servers that we are seeing with 8 or more cores we are starting to see better performance setting this to a 2 or a 4.  There is no magic number here, but we have still always found that anything is better than leaving this at 0 for Dynamics CRM.  We would recommend testing with 2 or 4 rather than 1 for CRM 2011 on SQL servers with 8 or more cores as that’s what we have typically been using with our premier customers.  With the query optimizations that were done in UR10 and UR11 we recommend re-visiting this setting as you may get better performance leveraging parallelism even more now.
      • SQL Server 2008 R2 Max Degree of Parallelism MSDN reference - https://aka.ms/luij0u
    • Enable SQL CLR
      • CRM 2011 has a MSCRMSqlClrLogin that is used for time zone conversions when you run dashboards, charts and advanced finds.  When the Microsoft SQL Server is enabled to use common language runtime (CLR), it can show a significant improvement in performance for those features.
      • Here is the MSDN link with steps to enable this - https://aka.ms/x0rert
    • Update statistics with Full Scan– We recommend doing this prior to and after the upgrade to CRM 2011
      • Here is the command you can use in SQL Management Studio: Exec sp_MSForEachTable 'Update Statistics ? with FULLSCAN'

     

    Post Upgrade Optimizations

    • Change the database backup model back to FULL Recovery Model– Remember to change the database recovery model back to FULL after the upgrade has completed.
    • Install Update Rollup 10 on the CRM Servers, SRS Data Connector, E-mail Router and Outlook Clients
      • Installing the latest Update Rollup is always recommended from Microsoft, but Update Rollup 10 in particular offers a lot of enhancements and optimizations. Specifically around Quick Finds and searches involving the PrincipalObjectAccess table and the use of the EnableRetrieveMultipleOptimization registry key.
      • Update Rollup 10 blog and podcast with download links - https://aka.ms/dtkco3
        • Note Update Rollup 10 was re-released on 10412, so please ensure you have the latest V2 build installed. We have a blog post detailing this as well - https://aka.ms/behme3
    • SQL Server
      • Setup a custom SQL job to re-index all CRM out of the box and custom indexes.  CRM will re-index all of this out of the box indexes by default, but we have found that our customers are better off disabling that feature as it also shrinks the CRM database and that can take a very long time and lead to possible downtime when your database is several hundreds of GB’s or larger.  We will be posting a blog article on our recommendations for this process soon and I will update this post with a direct link.
    • Run the CRM 2011 Maintenance Job Editor - http://crmjobeditor.codeplex.com/
      • Download and run this tool to update the CRM 2011 Maintenance jobs, so that these run during off hours.  If you do not set these CRM will run them based off of when you installed CRM and that could be during business hours in many cases since the server was not in production while you were setting this up.


    Jobs to update:

    Deletion Service

    Set this to run during off hours
    Index Management Set this to run during off hours. 
    Re-Index All Set this to run during off hours. 
    - Set this to run in 2050,for example, so it essentially disables the job
     - You would want to setup a separate SQL job to maintain indexes outside of CRM as I mentioned above
    Clean up Workflows Set this to run during off hours
    Create Audit Partition Set this to run during off hours
    Check for MUI Updates Set this to run during off hours
    Refresh Sharing Counts Set this to run during off hours
    Refresh Entity Row Counts Set this to run during off hours

     

    CRM Outlook Clients

    We ran out of time on this podcast to spend much time talking about upgrading the CRM Outlook clients, so we are planning to do a follow up podcast on that topic specifically.  However, we do want to provide you with a few quick best practices for upgrading CRM Outlook clients

    • Use SCCM or other management tools to push the CRM Outlook client upgrade.  Most of our customers use SCCM or other management tools to install and upgrade their CRM Outlook clients. 
      • Install CRM 2011 Outlook client using SCCM - https://aka.ms/mv4hru
      • Install CRM using command prompt and config XML files - https://aka.ms/fhh305
      • I wrote a blog post awhile back that I have used several times with my customers when building SCCM packages to deploy the client which details how to install CRM without an Internet connection.  Ideally you would push the pre-reqs ahead of time, but if that is not an option you can follow this blog and build them into your installer package too.  - https://aka.ms/bnzpx0
    • User Sync Filters, Settings, etc. are all maintained in the database and will be upgraded.
    • CRM 4.0 Outlook Client can communicate with a CRM 2011 Server!  This is a huge benefit for organizations where they cannot upgrade all the CRM Outlook clients over a single weekend.  CRM 4.0 Outlook clients will continue to work with an upgraded CRM 2011 server.  The only exceptions are that some new features like Connections, the Reading Pane and other settings will not be available in the ribbon or toolbar because those are CRM 2011 specific features.  Also, if you are using the CRM 4.0 Outlook client with offline access you will not able to go offline when configured to a CRM 2011 server until you upgrade to the CRM 2011 Outlook client.


    Some Lessons Learned

    We could write an entire book on this and probably should some day, but for the purposes of this blog supporting our podcast we wanted to highlight a few areas.

    • Operations Manual – Take the time to document and build an operations manual for CRM, so that you can track how to build servers, which registry keys or other settings were setup, etc., so that when you add another server later or move to a new deployment you are not running into issues that you prevented or resolved in the past.
    • Ensure you have enough free space on your SQL disk that hosts your transaction log file.   During the upgrade your transaction log will grow and we have seen this grow as much as twice the size your SQL data file, so make sure to allocate enough free space for the transaction log to grow during the upgrade.  We recommend allocating at least 2 to 3 times the size of your SQL data file for your transaction log during the upgrade.  Changing the backup model to Simple (as detailed above) will really help here as well.  The bottom line is to make sure you test this prior to upgrade and don’t let this be the reason why your upgrade fails on Friday night.
    • Supportability – CRM 2011 provides much more functionality and extensibility than CRM 4.0 did, so re-visit any unsupported stored procs, triggers, etc. that you have in place and look into whether or not you even need that workaround in place anymore, or if there are ways to do that with plug-ins or other supported methods in CRM 2011.  This will only help you in the long run and keep you out of unwanted trouble.
    • Smart Matching -  This is how CRM correlates e-mail and sets the regarding values on e-mails automatically in CRM 4.0 and CRM 2011.  We had some customers in CRM 4.0 that wanted to disable this feature and it was possible through a registry key detailed in this KB - http://support.microsoft.com/kb/958084.  In CRM 2011 we added the ability to configure and disable Smart Matching to the UI.  Because of this change we had to enable Smart Matching by default for all installs and upgrades.  So, if you had Smart Matching disabled in CRM 4.0 and want it to be disabled in CRM 2011 as well, you will need to go disable this in the UI.
      • Steps to disable in CRM 2011 – Settings | Administration | System Settings | E-mail | Un-check “Use Smart Matching” in the ‘Configure e-mail correlation’ section and click OK.  You will want to make sure that you are using Tracking Tokens then as well.
    • Configure CRM Deployment Manger for Network Load Balancing (NLB).  Almost all of our customers are using NLB in their CRM deployments and one of the steps that is sometimes forgotten is to setup NLB correctly after installing the additional CRM servers.  By default the first CRM server you installed will be listed in Deployment Manager, so you will not be leveraging NLB correctly until this is configured properly.

    Well, this blog post got a lot longer than I had anticipated, but I wanted to provide you with supporting details and URL’s to all of the topics that we covered during our podcast.  I hope that you enjoyed listening to our podcast, or even just consuming the information in this blog post.  Hopefully this will help your CRM 2011 upgrades go smoothly.

    Please let us know if you have any questions regarding this podcast andor blog, or if you are interested in learning more about Microsoft Premier Support and the services we deliver to our Premier Support customers.

    Thanks!
    Sean McNellis, Ryan Anderson & Shawn Dieken

    Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 11

    $
    0
    0

    NEW UPDATE as of 10/22: Please note!

    UR11 Outlook Client packages: The Update Rollup 11 installer packages for the CRM 2011 Client for Microsoft Office Outlook (build 5.0.9690.2835) were removed from the Microsoft Download Center temporarily and replaced on Wednesday Oct. 17th with a new build: 5.0.9690.2838. The reason for the re-release was an issue being reported when the client was running on Windows XP, where a user may see Watson errors when clicking on entities.

    If you have already installed the original 5.0.9690.2835 Client build and you are not running Windows XP, there is no need to update to the new packages.

    Build 5.0.9690.2838 (Outlook Client) as well as all other packages except Server were released to the Microsoft Update site Tuesday 10/23 around 10:30 AM Pacific time.

    UR11 Server packages:

    The UR11 server packages were reposted on the Download Center on 10/23/2012 to resolve the duplicate key error when importing solutions.  The duplicate key fix is the only addition to the Re-released (v2) server packages. You only need to install V2 if you are experiencing the issue, i.e. cannot import your customizations.

    ----------------

    We're proud to announce that Microsoft Dynamics CRM 2011 Update Rollup 11 was released on Thursday, October 11th, 2012 to the Microsoft Download Center! The release of Update Rollup 11 to Microsoft Update is still planned for October 23rd, 2012.

    Here's the "Master" Microsoft Dynamics Knowledge Base article: (KB 2739504). Going forward, the plan is for the Master Knowledge Base article to be published a bit in advance of release to help your release planning.

    On Friday, October 12th at Greg Nichols and Ryan Anderson from the Microsoft Premier Field Engineering team provided information about:

    • The recent re-release of Update Rollup 10 for Microsoft Dynamics CRM 2011
    • New fixes available In Update Rollup 11

    at 9 AM Pacific time on BlogTalkRadio during their Microsoft Dynamics CRM 2011 Update Rollup 11 Podcast.

    Big Update Rollup 11 news!

    • Increased support for Windows 8 / Internet Explorer 10 / Office 2013 Preview compatibility
    • More performance and stability-related fixes, including fixes to the CRM Client for Microsoft Outlook
    • Contains all hotfixes / updates released in earlier Update Rollups
    • Quick Find performance optimizations and EnableRetrieveMultipleOptimization SQL query performance optimizations (originally released in Update Rollup 10)

    For Microsoft Dynamics CRM business solutions that include an entity with a large dataset, record retrieval and grid rendering performance can be negatively impacted for users that do not have global access to all records associated with that entity. Code changes to mitigate this behavior first appeared in Microsoft Dynamics CRM 4.0, and have been fine-tuned since then.

    With Microsoft Dynamics CRM 2011 Update Rollup 10 and later, big advancements have been made to optimize the performance of queries against large datasets by adjusting specific “statistical” settings to address the issue. Should this fail to achieve desired levels of performance, adjust the value associated with EnableRetrieveMultipleOptimization (ERMO) setting. You may have heard these changes described at this year's Convergence.

    A first step in efforts to optimize the performance of queries against large data sets is to make adjustments to the “statistical” settings that affect the behavior of RetrieveMultiple queries. Although you can configure these settings by modifying the Windows Registry (under HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSCRM) on the each of the Web servers that is used in a deployment, we recommend that these settings be configured by using the OrgDbOrgSettings, which will ensure that the configuration applies to a specific organization. For additional information about configuring these settings by using the OrgDbOrgSettings, and to download the tool that makes the OrgDbOrgSettings changes you desire, see the Microsoft Knowledge Base article titled "OrgDBOrgSettings Tool for Microsoft Dynamics CRM 2011" (KB 2691237)

    If making adjustments to these settings does not yield satisfactory levels of performance, then consider adjusting the value of the EnableRetrieveMultipleOptimization (ERMO) setting. The ERMO setting is commonly used to limit the duration of certain long running queries; specifically, to overcome issues related to local or deep business unit access within Microsoft Dynamics CRM 2011 security roles.

    Many more details describing appropriate scenarios for the available settings are already available via the Microsoft Download Center in a revised version of the whitepaper "Optimizing and Maintaining the Performance of a Microsoft Dynamics CRM 2011 Server Infrastructure", in the sections “Optimizing the Performance of Queries against Large Datasets” and “Optimizing the Performance of Quick Find Queries”. The details will appear in the MSDN version of this whitepaper as quickly as possible.

    Note regarding Podcasts: You can make our CRM Premier Field Engineering podcasts available on Zune by using the RSS feed below.  In the Zune software, go to Collection -> Podcasts and click on the Add a Podcast button on the lower left, then enter the url for the RSS feed: http://www.blogtalkradio.com/pfedynamics.rss. After that, you can adjust the series settings like any other podcast, so you can sync with your smartphone or Zune.

    Update Rollup 11 Build number:
    5.0.9690.2835

    Notes:
    You will be able to uninstall Update Rollup 11, unlike Update Rollups 4-6 which could not be uninstalled.  However, you should always back up your databases and application servers before you install an Update Rollup.

    Update Rollup 6 established a new servicing baseline. This will enable uninstalls of some future CRM 2011 Update Rollups, but this also means that Update Rollup 6 is prerequisite for installation of all future Microsoft CRM 2011 Update Rollups starting with Update Rollup 7.

    A database created with Microsoft Dynamics CRM 2011 Update Rollup 6 or a higher version cannot be imported to a deployment of Microsoft Dynamics CRM 2011 Update Rollup 5 or an earlier version. This scenario is not supported.  Best practice is to import databases or customizations between environments that are at the same Update Rollup level.

    As Update Rollup 11 is cumulative, containing all changes released in earlier Update Rollup releases, it also contains the Dynamics CRM Q4 Service Update features released via Update Rollup 5.  Some of these features include:

    • Outlook Client Updates:
      • Enhancements to the Reading Pane
      • Asynchronous promotion for tracked emails
    • Dialog Enhancements
    • Data Visualization Enhancements:
      • Chart Designer Enhancements
      • New Chart Types
    • Data Management Enhancements to:
      • Auditing
      • Duplicate Detection
    • Activity Feeds
      • Listening in on important activities in Social Media that take place around the people, accounts, contacts, leads or opportunities that you care about, including a Windows 7.5 phone application: "Business Hub"
      • Update Rollup 5 does not install Activity Feeds:

    For more information about the Dynamics CRM Q4 2011 Service Update features, consult:

    Packages will be available for download via: 

    • The Update Rollup 11 Microsoft Download Center page (released Oct. 11th, 2012)
    • The Microsoft Update Catalog (release planned for Oct. 23rd, 2012)
    • The Microsoft Update detection / installation process (release planned for Oct. 23rd, 2012)
      • Note: Microsoft Dynamics CRM 2011 Updates will be pushed via Microsoft Update as Important updates
      • Client packages installed manually by downloading the packages and running install will require local administrator privileges. If the client packages are installed via Microsoft Update or SCCM (System Center Configuration Manager), they will not require local administrator privileges
      • Consider using Windows Server Update Services (WSUS) or similar software distribution technologies to distribute Dynamics CRM Update Rollups internally.  WSUS is a locally managed system that works with the public Microsoft Update website to give system administrators more control. By using Windows Server Update Services, administrators can manage the distribution of Microsoft hotfixes and updates released through Automatic Updates to computers in a corporate environment
      • For help with installation please see the Installation Information section of the Update Rollup 11 "master" Microsoft Knowledge Base article
      • Please review my teammate Shawn Dieken's superb (and recently updated) blog posting "How to install Microsoft Dynamics CRM 2011 without an Internet Connection" which provides details on how to set up an install on a machine without access to the Internet
      • Please review my former teammate Jon Strand's equally superb blog posting "CRM 2011: Silently Installing Update Rollups" which provides details on installing CRM Outlook client update rollups "silently" in order to limit end-user interruption

    for these CRM components:

    NOTE: As of Jan. 20th, 2012 these installation files have been updated to include CRM 2011 Update Rollup 6 (Build 05.00.9690.1992)

     Microsoft Dynamics CRM 2011 Update Rollup 11 Prerequisites:

    • Essentially the prerequisites listed in the Microsoft Dynamics CRM 2011 Implementation Guide download or online versions for the various CRM components serviced
    • You must have Microsoft Dynamics CRM 2011 Update Rollup 6 installed (build 5.0.9690.1992) to apply this Update Rollup

    Note regarding Microsoft Dynamics CRM Stack Technology Compatibility:

    Do you want to know if certain Service Packs or versions of a Microsoft product are supported with Dynamics CRM? Now we have all of this in one “living" Knowledge Base article: the Microsoft Dynamics CRM Compatibility List.  For example, you can use this KB article to determine the latest Microsoft SQL Server major version and Service Pack that is supported. Microsoft lists new products like Internet Explorer 10, Microsoft Windows 8, and Microsoft Office 2013 Preview as TBD until testing is complete; generally near General Availability (GA) of that product.

    Issues resolved via Microsoft Dynamics CRM 2011 Update Rollups: 

    Microsoft Dynamics CRM 2011 Update Rollup 11 is the eleventh (or tenth, considering that Update Rollup 9 was not released publicly) of a series of cumulative Update Rollups that include fixes for the issues that are or will be documented in the "Master Knowledge Base Articles" for CRM 2011 Update Rollups.  As they are cumulative, Update Rollup 11 contains all fixes shipped via Update Rollups 1-11, including fixes that were never publicly released via Update Rollup 9.

    Hotfixes and updates that were released as individual fixes before Update Rollup 11 release:

    The following issues were fixed and delivered to requesting customers prior to Update Rollup 11 release as Critical On Demand (COD) fixes and are included in Update Rollup 11:

    • Assume that you have a Microsoft Dynamics CRM database that contains more than 100,000 users. You import an organization. In this situation, when you try to map users during the organization import process, the Import Organization wizard seems to freeze before the User Mapping table is opened
    • When you open a managed dialog box in a Microsoft Dynamics CRM 2011 client for Outlook, a memory leak occurs. Additionally, the Outlook client may crash
    • When you add an OnSave action script on a Service Activity entity by using Jscript Libraries Editor, the OnSave action does not work as expected before a Service Activity record is updated in the database
    • When you change a price list item, closed opportunities are updated unexpectedly
    • Unexpectedly, you cannot enable the Sending email option for an entity that has existing records
    • When you reply to an email message that was tracked in Microsoft Dynamics CRM 2011, two entries are inserted in the ActivityPointerBase table incorrectly
    • Custom error messages for software development kit (SDK) plug-ins are not displayed as expected. Instead, a generic error message that states that ISV code aborted the operation is displayed
    • Unexpectedly, you cannot add a sales literature attachment to a custom entity
    • When you add many members to a marketing list, you experience slow performance. Additionally, an Internet Explorer script error may occur. This issue occurs when the paging functionality is used in the members lookup
    • When multiple secure token services (STS) are used to access Microsoft Dynamics CRM 2011, the WHR parameter (Home Realm) that was added to the CRM sitemap is blocked by the parameter filter unexpectedly
    • After you install Internet Explorer 9, you cannot export or save reports from the Microsoft Dynamics CRM 2011 Client for Outlook
    • Assume that you create an appointment in Microsoft Dynamics CRM 2011. You edit the appointment in Outlook. In this situation, duplicate appointments are created
    • After you apply Update Rollup 10, a SDK DataContractJsonSerializer error may occur in Service Contracts
    • You receive the following error message in Microsoft Dynamics CRM 2011 client for Outlook:
      • Event ID 9646 : Mapi session Exceeded the maximum of 250 objects of type "objtmessage"
    • When you run the Set Regarding function in Microsoft Dynamics CRM 2011 client for Outlook, you may receive a warning message that states that you do not have permissions to take this action
    • If you have the Symantec Enterprise Vault add-in installed, unhandled Windows forms thread errors may occur in Microsoft Dynamics CRM 2011 client for Outlook

    Other fixes released via CRM 2011 Update Rollup 11:

    • When you upgrade an organization from Microsoft Dynamics CRM 4.0 to Microsoft Dynamics CRM 2011, permissions for the SystemForm entities are not assigned correctly
    • When you run the Set Regarding function on an email message, the lookup view lists all active accounts. However, you should be able to set a different default view for the lookup
    • The table header cells in CRM tables do not have a specific row or column attribute
    • The WAUTH parameter is not supported in Federation Provider properties in the deployment web service
    • When you run the Mail Merge function, the CRM add-in crashes on the Word Automation services
    • When you change the First Week of Year setting in the organization settings, the changes are not considered when the system uses the fetch functionality to retrieve some date data that is grouped by week
    • After you change the reminder time in Outlook, recurring appointments are corrupted
    • When you perform a Quick Find search on the Activities view, the search may return unexpected results
    • You cannot hide CRM ribbons in Outlook 2010
    • The Address Book Sync Entity list is not filtered by security permissions
    • When you perform bulk operations in Microsoft Dynamics CRM 2011 client for Outlook, you experience slow performance
    • When you access a CRM website in a claims authentication deployment, the Authentication Engine may reject the request. In this situation, you receive the following error message:
      • 404 - File or directory not found
    • When you browse to the Discovery service, you receive the following error message:
      • The server was unable to process the request due to an internal error
      • This issue occurs because of the address in the deployment manager
    • The Rule Deployment wizard does not work in a Microsoft Exchange Server 2003 and Exchange Server 2010 mixed environment
    • When

    Microsoft Dynamics CRM 2011 E-mail router Availability and scalability

    $
    0
    0

    I’ve a customer who is expecting – due to a business merge – a huge increase in the volume of E-mails on daily basis from 300 to 20,000. Currently the setup is one e-mail router per each organization to handle both inbound and outbound emails, no forward mail boxes. Due to that change, they are considering scalability options.

    So my customer is after scalability (ability to serve more users and/or bigger volume of transactions) not availability (which is minimizing down time and making sure service “available” as needed by operations requirements).

    E-mail router Availability:

    Looking at the available resources and the Implementation guide I found references to Availability solution not Scalability as follows.

    http://www.microsoft.com/en-us/download/details.aspx?id=3621

    http://technet.microsoft.com/en-us/library/hh699708

    Which is basically as follows:-

    Step 1: Establish the cluster

    Step 2: Install the E-mail Router to the active primary node in the cluster

    Step 3: Install the E-mail Router to the passive node in the cluster

    Step 4: Create the generic resource service for the cluster

    Step 5: Verify and monitor the cluster

    Scalability options:

    What we mean here is having more than one E-mail router, installed in more than one machine, serving the same organization, and all of them are active.

    Multiple routers hosting the same inbound or outbound email profiles is not officially documented in the product implementation guide or any of the white papers issued by the product team, that makes it - based on the rule of thumb “not documented not supported”- not supported.

    Actually having multiple routers works fine, but the problem is the potential for duplicate inbound email activities being created or outbound emails being sent (due to not having locking mechanism to control this).

    Given that fact and considering the configurations of Email router, and the below rules

    Rules:-

    1. Only one instance of the email router can be installed on a single machine.
    2. Each forward mailbox can only be processed by one email router.

     

    Scalability options I found are:-

    Important guidance here is, we should balance the out bound spread across routers based on the amount of emails being sent from those mailboxes not just by number of mailboxes. We discovered that 90% of email volume comes from 10% of the users, not to forget auto generated emails Ex: confirming receipt of email and OOB.

    1. We can separate incoming and outgoing processing across email routers (i.e. [machine 1 / email router 1] processes the incoming emails forward mailbox, and [machine 2 / email router 2] processes outbound mail).
    2. We can split out the outgoing emails across multiple email routers as long as each email router has a unique set of email address in its configuration, i.e. [machine x / email router x] processes outbound for queue1@test.com, queue2@test.com, user1@test.com, user2@test.com, and  [machine y / email router y] processes outbound for queue3@test.com, queue4@test.com, user3@test.com, user4@test.com.
      1. Good community article in that option :-http://quantusdynamics.blogspot.co.uk/2012/02/dynamics-crm-installing-email-router-on.html
      2. That option imposes HUGE maintainability issue, you have to maintain the list the email addresses.
    3. If we have multiple forward mailboxes we can use an email router (on its own machine) for each forward mailbox.
    4. Regardless of how many routers we are splitting across as described in the above scenarios, within one organization we are still querying on single tables – so adding appropriate indexing will also help performance.
    5. Coding and customization. Building on Option 2 above,
      1. Write code to populate the appropriate users in each XML file.
      2. Add a field to a user form that specifies which email router to use.  This should probably be a lookup field pointing to a custom entity that holds a list of email routers, perhaps holding server name and IP.  Make the field business required to ensure it is populated.
    6. Then there are a few options for the customs code:
      1. Custom workflow assembly or plugin to be triggered when the router value changes against a CRM user record.  Connects to the specified previous email router server and updates the XML file to remove the user, connects to the new router to add the user to the XML file.
      2. Write a windows service that runs on each email router to update the distribution of users by connecting to the crm services and returning a list of all users that should be on that server and updating the XML.
      3. Write CRM Powershell or a batch command file that does the same as the above which is run by the scheduling process on each router server on a fixed schedule.

    Performance of email router:

    Having that all said, how good is the performance of e-mail router?

    I would say it’s pretty solid, and I didn’t hear about availability problems with email routers so far. Check the article Large-scale CRM email processing at Microsoft

    I’d like to call out:- One e-Mail router, 83 Deployment, 24 hours, 9400 received emails, 2400 tracked in CRM 2011.

    So, before deploying scalability solutions make sure you actually need it.

    · This information is provided for the purpose of illustration only and is not intended to be used in a production environment.  THIS INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.

    RESOLVED: Unexplained Internet Explorer 302 Redirects to CRM 2011 Mobile Site

    $
    0
    0

    I recently worked with a customer who had end-users encountering a strange behavior where all attempts to access the main CRM 2011 web site were being being redirected to the CRM mobile site (../m/default.aspx).  While this is normal behavior when accessing CRM via currently unsupported browsers (Firefox, Safari, Chrome, etc.), what made this strange was that the users experienced this behavior in Internet Explorer. The behavior was consistent for all affected users, however not all users were affected.  Also, launching an In-Private browsing session in IE (ctrl+shift+P) and navigating to CRM did not produce the behavior. 

    We decided to run a fiddler trace for an affected user where the behavior was reproduced as well as for the same user in an In-Private browser session.  After capturing both scenarios we filtered down to the /default.aspx GET request and subsequent redirect/request.  The reproduced scenario showed a 302 redirect response to /m/default.aspx, the CRM mobile site, and the working scenario (In-Private session) showed the expected, subsequent GET request for /main.aspx

    Having successfully reproduced the behavior and captured a working, control scenario we started to compare the two GET requests for /default.aspx.  What became immediately apparent was that the User-Agent header value differed between the two requests.  The control scenario showed a typical profile for Internet Explorer, but most intriguing was that the reproduced scenario specified a non-IE user agent in the header.  The particular element of the user agent that caught our attention was ‘Chrome/22.0.1229.94’.  Why did the request appear to be coming from a Chrome browser when using IE?

    This discovery prompted a discussion about IE browser plug-ins and it turned out that the affected user had installed an IE plug-in from Google called Chrome Frame which is a supplementary install alongside a Chrome browser installation.  This plug-in provides a Chrome-based browsing experience, for purposes of HTML5 and Chrome-optimized site support, inside of Internet Explorer.  We disabled the Chrome Frame IE plug-in and the user was then able to navigate to the main CRM site successfully.  This cause also explains why the In-Private session did not exhibit the behavior since browser plug-ins are disabled in that mode. 

    For this reason, we strongly recommend that such third-party add-ins/plug-ins be avoided both for Internet Explorer and for Outlook since they can introduce undesired and often unexpected behavior affecting CRM.  Such behavior can be difficult to troubleshoot.   In our case, we were lucky that the cause was fairly visible in a client-side trace.  As a general rule, disabling plug-ins is a good client-side triage/troubleshooting technique to minimize variability.

    In regards to the Chrome Frame plug-in, its primary purpose of HTML5 support for Internet Explorer is unnecessary.  Opt instead for IE9 which begins to support the HTML5 spec and ultimately upgrade to IE10 with Windows 8 (or Windows 7 when available) for more extensive native support.

    Below is the Fiddler trace output from both the reproduced and working scenarios:

    Reproduced Behavior in Internet Explorer

    image

    image

    User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; chromeframe/22.0.1229.94) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4

    Working Scenario in Internet Explorer (In-Private browsing session)

    image

    image

    User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET CLR 1.1.4322; .NET4.0C; .NET4.0E; InfoPath.3; MS-RTC EA 2)

    Austin Jones

    Microsoft Premier Field Engineer


    Custom Reporting in Microsoft Dynamics CRM – Fetch vs. Filtered Views

    $
    0
    0

    Frequently we see customers that require reporting out of Microsoft Dynamics CRM that cannot be handled using the out of the box report wizard or advanced find. This is the first post of a series of blogs I will be posting around both reporting options as well as technical issues and cases we have seen and resolved within our customers environments.

    When it comes to building SSRS reports for Microsoft Dynamics CRM 2011 using Visual Studio (Business Intelligence Development Studio, a feature that can be installed as part of SQL Server), there are two options available that provide you the ability to query and format your CRM data into flexible dynamic reports. The options are SQL reports querying the CRM Database Filtered Views or using Fetch, a proprietary query language commonly referred to as FetchXML, this language utilizes the CRM Report Authoring Extension that is to be installed alongside Visual Studio’s Business Intelligence Development Studio. In this post I will define the capabilities of each option as well as explore which option makes the most sense for the different deployment options within Microsoft Dynamics CRM. I will begin by explaining the differences between querying the CRM filtered views and FetchXML and discuss the different options available for the deployment options.

    FetchXML

    Fetch is a proprietary query language that is used in Microsoft Dynamics CRM. The FetchXML language supports similar query capabilities as a SQL query expression. Within Microsoft Dynamics CRM Fetch is used to save a query as a user owned saved view or as an organization owned view in the - the functionality behind Advanced Find, also utilizing the out of the box security structure. Fetch XML queries can actually be generated from within the Advanced Find tool within CRM as a great starting point for your reports data set.

    When utilizing FetchXML to create SSRS reports in CRM, the query is sent to the web server to retrieve data from CRM database, permitting SSL only connections to the web server will protect data over the wire in the case of IFD and CRM Online deployments, additionally, this is the only option for creating custom SSRS reports in CRM Online.

    SQL Database Filtered Views

    Microsoft Dynamics CRM includes SQL database filtered views that are used for business data access, when these tables are queried the data in filtered views is restricted at three levels: the organization, the business unit, and the owner, therefore utilizing the out of the box security structure to limit the data that is returned. Filtered views exist for all Microsoft Dynamics CRM business objects (entities). They key difference between using the two to create your report is compatibility with CRM Online vs. CRM On-Premise deployments:

    CRM On-Premise Deployments

    If you are using Microsoft Dynamics CRM On-Premise version, the preferable option would be the CRM Database Filtered Views to create reports as using a T-SQL Query, making very complex reporting scenarios easier to handle and also offering a much more flexible development experience as there are no limitations. . That being said, FetchXML can be preferred, even in an On-Premise environment due to its optimal performance. When utilizing Fetch reports in CRM they use FetchXML queries instead of SQL queries, they do not need to use the filtered views in the Microsoft Dynamics CRM SQL database to retrieve data for reports. Since FetchXML reports no longer have to use filtered views in order to honor CRM security, the time that it takes to execute these FetchXML queries should decrease. Therefore if the custom reports you are looking to build fit within the limitations below, it may be worth evaluation.

    CRM Online Deployments

    The first thing to note is that you cannot access filtered views in Microsoft Dynamics CRM Online because access to the SQL database is not supported, therefore the only option is to use Fetch. One big win for report writers though is the ability to generate your FetchXML queries from Advanced Find and as mentioned performance is a key benefit to using Fetch reports. In regards to the limitations, Fetch introductions a few potential road blocks in development flexibility and complexity, those limitations include:

    1. Fetch does not support RIGHT OUTER JOIN and FULL OUTER JOIN
    2. Fetch does not support EXISTS/IN condition with sub-query/expression
    3. An amount of 5000 returned records maximum
    4. No “UNION” selects
    5. You cannot specify group by / sum queries – You can only select the records in detail and then perform the aggregation in your report. 
    6. Number of entity join (link) limitations
    7. FetchXML reports cannot use non-CRM online data sources
    8. Learning curve – for report writers that are not familiar with FetchXML the syntax is quite different from SQL.

    Summary

    The following table summarizes some of the key differences between these two reporting options:

     

    SQL Reports

    FetxhXML Reports

    Development experience

    Requires a separate program for designing the report such as SQL Business Intelligence Development Studio (BIDS) or Report Builder.

    These reports are also designed using BIDS (must download the CRM Report Authoring Extension).

    Report writer skill set

    Building SQL reports requires SQL Server skills and development experience.

    Building SQL reports requires SQL Server skills and development experience, as well as FetchXML query knowledge. The Advanced Find tool can also be used to build FetchXML queries.

    Flexibility

    These reports can take data from CRM and present it in multiple ways. Reports can achieve complex requirements as you can use any feature from SQL Reporting Services.

    Functionality is restricted to what the Report Wizard or Custom FetchXML can support, limiting the ability to return complex queries.

    Data queries

    Data is queried using SQL statements that read the filtered views in the organization database.

    FetchXML queries are used for retrieving data for these reports (Advanced Find can be used to generate FetchXML queries).

    Reporting mechanism

    These reports can be scheduled, delivered by email and other mechanisms.

    Must be executed on-demand.

    CRM Online Support

    Not supported

    Supported

     Ready to get started with custom reporting in Microsoft Dynamics CRM? As noted above, I will be posting a series of additional report related blogs, I have also added a few resources below for more information on Fetch vs. Filtered Views.

    Helpful Resources:

    FetchXML

    Filtered Views

    Developing Fetch XML Based SSRS Reports

    Thanks!

    Sarah Champ

    Microsoft Premier Field Engineer

     

    CRM 2011 Service Principal Names (SPN) generation and usage

    $
    0
    0

    When we implement CRM 2011 we always hear or read the term Service Principal Name (SPN) for accurate Kerberos Authentication; however, sometimes understanding Kerberos Authentication is time consuming and needs experience.

    Sean has written a detailed blog explaining Kerberos Authentication here.

    Identifying the right SPNs can be daunting and it would be really nice if we had a simpler way to identify them.  To make SPN identification easier I have put together an excel workbook which could help us generate a list for different deployment schemes.  The Workbook has different sheets covering most common scenarios like Single Server Deployment and Split Server Deployments. (see attached worksheet below)

    Please feel free to post your feedback to improve the workbook so we can accommodate more deployment scenarios.

    Thanks
    Kaustubh Giri

    Microsoft Premier Field Engineer

    Setup SPNs.xlsx

    Three Obscure Dynamics CRM 2011 Hot fixes, Part One

    $
    0
    0

    Have you ever read about a new feature, or noticed in the latest Update rollup (UR) a feature, or even a fix, that didn’t really made a lot of sense to you!?  Working with enterprise customers I actually get to see the logic behind some of these, however still not all of them. 🙂

    Every time I’ve 3 features to talk about I’ll blog about it, this time I’m talking about:

    1. Option to remove Track in CRM button/menu - UR10
    2. CRM 2011: Quick Find Optimization - UR10
    3. Mail items from Outlook Explorer are not promoted when the items are opened in the background - UR7

     

    1 - CRM 2011: option to remove “Track in CRM button/menu” –UR10

    Description:

    You cannot disable the Track in CRM buttons and the Track in CRM shortcut menu entry. The Track in CRM buttons and shortcut menu entry should have a configurable option.

    Setting:

    OverrideTrackInCrmBehaviour

    Comments:

    Some people see the track button as an answer to a very important scenario. That is, I want to accept the received e-mail as part of my system, but I don’t want to assign it as soon as I receive it. I’m going to assign it later in my business process.  A common example is an email received in a queue where a customer rep will later pick it up and work on it.  When that happens, then it will be assigned.

    Others see it as unneeded functionality.  For them, there is no meaning of tracking an email if it’s not assigned to something in CRM.  Otherwise it’s an orphaned record, incomplete information, or it cannot be processed further if it doesn’t have that piece of information.  A common example is a request to support a certain product for a company that has many products.  If upon receipt it’s not assigned to a product, it can’t be further processed.

    For the latter scenario if you want to disable the functionality of “just track”, then make sure you apply UR10.  Set the value of OverrideTrackInCrmBehaviour to 1, which will make the track button function like the “Set Regarding” button.  So regardless what button is clicked user will have to assign a record if they are going to track the email.  Remember to use supported method to change the setting, such as using the OrgDBOrgSettings Tool.

     

    2 - CRM 2011: Quick Find Optimization –UR10

    Description:

    A-    When you perform a quick find, you experience slow performance.

    Settings:

    EnableQuickFindOptimization

    Comments:

    With Microsoft Dynamics CRM 2011 Update Rollup 10 (UR10), the implementation of Quick Find functionality has been updated to better take advantage of indexes and the SQL query engine to provide better performance.  For the most part, we recommend leaving this setting at the default (on) after installing UR10 or above as performance should improve with this setting.  However in rare cases, disabling this setting can provide benefits in certain environments. The new Quick Find query structure can be disabled with an OrgDbOrgSetting - specifically by setting the value of the EnableQuickFindOptimization setting to 0.Remember if you are going to use the setting, use supported method to do that. (Ex: OrgDBOrgSettings Tool).

    Description

    B-     Enable Quick Find record Limits

    Settings:

    You can manage it from the interface (Settings | Administration | System Settings | General Tab)

    Comments:

    Another Quick find optimization in Microsoft Dynamics CRM 2011 UR10 introduces a new option in System Settings, “Enable Quick Find record limits”.  This setting can help to improve performance by protecting the system from runaway queries. For example, with this setting enabled, if a user performs a Quick Find search that returns 10,000 or more records, rather than presenting the user with the search results, the system will alert the user with the following message:

    Quick find limit exceeded. Please use a more selective search value, or use Advanced Find for your search.

    If users need to regularly use Quick Find to search for records which will potentially match over 10,000 records, this setting can be disabled.  However we recommend leaving this setting set to “Yes” and instead use Advanced Find for these type of queries.

    For more information about the Quick Find functionality, view the "Optimizing the Performance of Quick Find Queries" section of the Optimizing and Maintaining the Performance of a Microsoft Dynamics CRM 2011 Server Infrastructure

     

    3 - CRM 2011: Hotfix email items promoted from Outlook Explorer will not promote when opened in background. – UR7

    Description:

    Mail items from Outlook Explorer are not promoted when the items are opened in the background.

    Settings:

    VerboseErrorsOnPromoteToCRM

    Comments:

    The issue is when the user tries to promote an Email from Outlook while it’s opened in a separate window, nothing really happens, and no response is actually thrown at the user.  For example, a user opens an email message from Outlook in a new window.  Then, prior to closing that window, they return to Outlook and the email window gets hidden behind other windows.  Back in Outlook, the user tries to promote the same email to CRM.  Since the email is already opened in another window, nothing actually happens and there is no notification to the user. Having the VerboseErrorsOnPromoteToCRM option turned on (1) will display an error message to the user informing them that promotion can’t be done because the item is already opened, which clears a lot of confusion. This option is off by default. (Value: 0) Remember if you are going to change the setting, use a supported method to do that. (Ex: OrgDBOrgSettings Tool)

     

    That’s it for this episode, more to come 🙂 .

    Thanks to Great help and contribution by Ryan Anderson.

    Watch out for this CRM 2011 Workflow upgrade gotcha!

    $
    0
    0

    I was recently working with a customer who was getting an error when importing a solution into a CRM 2011 organization.  The solution was the default solution from an organization that had recently been upgraded from CRM 4.0, and the error was pointing to a specific Workflow that wouldn’t import.  After finding the workflow, we noticed a few things:

    • The workflow was actually a workflow template.
    • The workflow was calling a child workflow
    • In the workflow steps, when clicking on the child workflow an error appeared.  After further investigation, it was determined the child workflow no longer existed.
    • The owner of the workflow had since left the company and the person’s AD account had been removed.  The CRM user account existed of course but could not be used since the AD account no longer existed.

    In an effort to take ownership of the workflow with an active user, we tried to assign the workflow using a CRM admin account.  However we received errors while doing this.  We then updated the original owner account by changing the active directory user to an active “dummy” account.  We then logged in with that dummy account and tried to edit the workflow.  We still got errors.  It was impossible to reassign, deactivate, or even delete the workflow no matter the user account.

    The reason the solution was failing on this workflow was because the child workflow no longer existed.  However, the errors we were getting when attempting to edit the workflow were also because the child workflow no longer existed.

    After further research, I discovered there is a difference between CRM 4.0 and 2011 in how child workflows relate to a parent workflow.  In CRM 4.0, if a parent workflow calls a child workflow, that child workflow can still be deleted.  And if so, the parent workflow handles this by allowing you to Unpublish the workflow and remove the child workflow step.  However, in CRM 2011, if you attempt to delete a child workflow that is being used by a parent workflow, you will receive an error and will be required to remove the child workflow from the parent workflow first.  What we were running into was a workflow state that should be impossible in CRM 2011, but since it was upgraded from CRM 4.0 it was possible.

    There is little that can be done in a supported manner to fix this situation.  The best solution is to go back to the CRM 4.0 environment and fix the workflow first.  This could be removing the child workflow step in the parent, or remove the parent workflow altogether. Then upgrade the 4.0 organization to 2011 again and the problem should be resolved.  This underlies the importance of reviewing your CRM 4.0 data prior to upgrading to 2011, and testing after the upgrade, especially your workflows as shown in this case.  This workflow wasn’t even being used in 4.0 but caused an issue in 2011 after the upgrade.

    For more information on Microsoft CRM upgrade best practices, see the CRM Implementation Guide.  Also refer to our Upgrade Readiness and Production Upgrade services listed in our Menu of Services and the CRM Upgrade Best Practices blog.

    If you’d like to keep in touch with our team, you can follow us on our CRM in the Field blog as well as on Twitter and through our Podcasts.  If you have a Microsoft Premier support contract and wish to work with a member of our team, ask your TAM about the PFE offerings for Dynamics CRM.

    Ryan Anderson

    Microsoft Premier Field Engineer

    Dynamics CRM 2011 SDK Query Limitations by API

    $
    0
    0

    *UPDATE: In the table below, LINQ was incorrectly marked with no support for LEFT OUTER JOIN whereas the provider does support it as documented here. The LINQ column has been updated to correctly reflect support for this type of table join.

    The Microsoft Dynamics CRM 2011 SDK provides a flexible array of query API's for retrieving data programmatically. Nevertheless, I continue to encounter misinformation and unfounded affinity for one query API over another, as well as those that favor circumventing the application tier altogether without sufficient justification. While limitations are inherent in each API and circumstances exist that may warrant venturing into unsupported territory, more often than not a data access requirement can be accomplished efficiently via one of the provided API's. After repeated discussions with customers and partners on this subject, I decided it would be beneficial to document a definitive list of specific limitations inherent in each query API to provide clarity on which approach to choose and when to consider alternatives.

    While this post intends to focus on capabilities rather than comparing performance, I do have to briefly call out anyone who is making the "We are retrieving data via Filtered Views for performance reasons" argument. If by "performance" you really mean "efficiency" from the perspective of shaping your result sets, then there may be justification given the specific limitations this article intends to identify. Otherwise, this argument holds little merit based on the degree of de-normalization and data transformation pitfalls inherent in the Filtered Views. These characteristics of Filtered Views directly limit your ability to optimize query execution and thus actually present additional performance concerns. Consider too that Filtered Views do not benefit from the recent UR10 query optimizations nor are they available in all deployment scenarios.

    That said, let's define each query API's boundaries. In the table below, I've listed common SQL query elements that have not been exposed with an equivalent construct in at least one query API. Any API's that do not implement an equivalent construct have been marked with an 'X' in their column for that particular row.

    SQL Query Limitations by API

    FetchXML

    QueryExpression

    LINQ*

    OData**

    LEFT OUTER JOIN

    X

    GROUP BY

    X

    X

    X

    Aggregate Functions (COUNT, SUM, AVG, MAX, MIN)

    X

    X

    X

    Statistical Aggregates (STDEV, VAR, etc.)

    X

    X

    X

    X

    FULL OUTER JOINs

    X

    X

    X

    X

    RIGHT OUTER JOINs

    X

    X

    X

    X

    Composite JOINs

    X

    X

    X

    X

    Strictly Non-equi JOINs

    X

    X

    X

    X

    NOT EXISTS/IN [sub-query]

    X

    X

    X

    X

    Combining Multiple Result Sets (UNION, INTERSECT, EXCEPT)

    X

    X

    X

    X

    *The LINQ provider requires that the left side of each predicate condition must reference a CRM entity attribute.
    **OData requests allow you to expand up to 6 entity relationships per query in lieu of table joins. All OData results are limited to pages of 50 records/page.

    First, it should be noted that the most capable query API is FetchXML. Anyone still avoiding this approach based on experience with the CRM 4.0 SDK should reevaluate it for CRM 2011. Long gone are the headaches of manually parsing XML results. Rather, FetchXML query requests now return the same EntityCollection that's returned via QueryExpression query. Similarly, anyone that previously avoided QueryExpression should consider that significantly expanded capabilities in the CRM 2011 SDK make it a viable alternative to FetchXML. As you can see in the table above, the only appreciable difference is that FetchXML offers grouping and aggregation support.

    The LINQ provider, a new API in the CRM 2011 SDK, abstracts QueryExpression from the developer in favor of the more fluent and familiar LINQ syntax. While it does present a few additional limitations compared to its FetchXML and QueryExpression brethren, it offers a highly efficient and maintainable developer experience that deserves strong consideration.

    I generally advise as follows: If unwilling to compromise on standardizing to a single API, then choose FetchXML, it being the most capable. Otherwise, take time to learn all API's and don't hesitate to incorporate a combination in your solution where appropriate.

    In addition to the three SOAP-based query API's, CRM 2011 provides a RESTful endpoint that streamlines data retrieval in client-side extensions. This endpoint implements portions of the OData protocol to provide a standardized Uri request pattern. It also returns a serialized JSON response which minimizes response payload size and makes parsing results on the client much easier. For these reasons, I prefer to use this approach in client-side extensions wherever possible.

    Finally, if your data access requirement dictates shaping the desired SQL data set in such a way that can't be accomplished in a single programmatic query, querying directly from the Filtered Views may ultimately be your best option.

    So, there you have it. A single reference point to use when deciding between query API's or whether to use them at all. For additional perspective, check out a recent post by Sarah Champ contrasting FetchXML vs. Filtered Views in Custom SSRS Reports.

    Austin Jones

    Microsoft Premier Field Engineer

    Script Errors after Installing UR12

    $
    0
    0

    Along with other fixes and features, CRM 2011 UR12 ushers in the capability of using multiple browsers.  To allow for this the CRM product has been updated and the original HTC behavior files behind much of CRM’s UI have all been removed. This removal of the HTC’s should help with performance and compatibility across browsers but these HTC’s also allowed for the use of the deprecated CRM 4.0 JavaScript calls/functions.  If you are looking to test and upgrade to UR12 we suggest you take three important steps in that process:

    1. Download and run the code validation tool to highlight customizations that will be impacted after UR12 is applied. (Direct Download URL)
    2. Read this KB on causes for script errors after UR12: http://support.microsoft.com/kb/2804561 
    3. If your organization requires the use of the deprecated CRM 4.0 JavaScript functions you are able to re-enable the HTC behaviors which will maintain support for these functions.  There may be some performance implications with this but you will be able to support your CRM 4.0 compatible JavaScript functions for the short period of time you require before updating it to CRM 2011 compatible functions. 

    NOTE: This is an extension to the article posted on the CRM Team Blog: Script Errors After the December 2012 Service Update and is also in addition to a previous article posted on our blog.

    How to enable HTC behavior files in CRM 2011 UR12/Polaris/December 2012 Update:

    1. Open the Dynamics CRM Web UI, Click Settings, in the left navigation click Administration, in the main area of the UI click on System Settings to launch the system settings dialog box. 
    2. In System Settings dialog box click the Customization Tab, and under HTML Component Support check the box for “Include HTC Support in Microsoft Dynamics CRM Forms.” 
      image

    As always our PFE team is ready to help you with this, we can assist with code samples and various other engagements to help you update your CRM environments JavaScript if you need the assistance.  In addition, we have a plethora of other services we offer such as developer training, admin workshops, and code reviews.  If you would like to have another Microsoft PFE or I visit your company and assist with the ideas presented on our blog, contact your Microsoft Premier Technical Account Manager (TAM) for booking information.  For more information about becoming a Microsoft Premier customer email PremSale@microsoft.com, tell them CRMInTheField or I sent you.

    Thanks!
    Sean McNellis

    Improving Dynamics CRM Report Performance – Part 1 “The Basics”

    $
    0
    0

    A lot of times customers have questions around how to improve reporting performance in Dynamics CRM. Of course, with every CRM deployment and report the answer may be different, but some tips can be applied more generally. In this post I will discuss some basic tips and tricks to improve your Dynamics CRM reports, specifically around query tuning and using Visual Studio’s Business Intelligence Development Studio. This is the second blog post in the CRM Reporting Series, you can find the first post in the following link which focuses on the different options for querying data and building reports out of CRM: Custom Reporting in Microsoft Dynamics CRM - Fetch vs. Filtered Views

    When thinking about reporting, the total time that it requires to generate a report can be split into three different actions:

    1. Time it takes to execute the reports queries on the SQL Server.
    2. Time it takes to process the report on the reporting server, based on the result set of the executed queries.
    3. Time it takes for the report to render.

    There are many possible culprits of reporting performance issues and often users jump to the conclusion that it has to be a server side issue. Maybe so, though many times we see that report performance issues in CRM are directly related to the datasets, queries and report formatting logic within the report that could be optimized for better performance. The following are suggestions for optimization as you begin to troubleshoot:

    Suggestions for all Dynamics CRM Deployment Types:

    The following summarizes the recommendations that can be performed using reporting tools for both CRM On-Prem and CRM Online, specifically what can be done using either SQL Queries OR FETCHXML, which is the only option for CRM Online.

    Optimize Report Queries & Retrieve the Minimum Amount of Data Needed in your Report

    • Review the number of fields returned in each dataset, you will likely find that they contain more columns than used in the report. The more columns returned the slower your query execution, if there are fields that are not being using in the report, they should be removed from your query.
    • Ensure all queries being executed are being used in the report. When a report is run every dataset in the report will be executed, regardless of if it is being used in a report. A lot of times new datasets are added during building of reports and not cleaned up later on. Check to ensure that all datasets are still being used, for instance, datasets for available parameter values and if it is determined that there are data sets no longer being used be sure to delete them from your report.
    • If possible, add filters and parameters to reduce the number of records returned, large result sets (more than 250 records) are more like a data export. By adding parameters that users must specify when they run the report, such as date ranges or owner, or by adding additional selection criteria to a report you can greatly reduce the data that is filtered for the report each time it is run by a user.
    • Look very critically at the need for the large result sets and scale back if possible. The time it takes to render a report will increase based on the number of records being returned, as well as the number of data sets in your report. If the details are only used in a small amount of the situations, create another report to display the details which will avoid the retrieval of all details in the larger number of situations.
    • Using ORDER BY in the dataset differs from the ORDER BY in the Tablixlist. You need to decide where the data will be sorted. It can be done within SQL Server with an ORDER BY clause in the dataset or in by the Reporting server engine. It is not useful to do it on both sites. If an index is available use the ORDER BY in your dataset query.
    • Additionally, a lot of times data is GROUPED in the report without any drill down, in that scenario perform the GROUP BY in your dataset query which will save on data transfer to the SQL Server and it will save the reporting server engine having to complete the GROUP BY.

    Reporting Services (Business Intelligence Studio) Recommendations

    • Keep in mind where you are using page breaks, reports are rendered into pages based on where page breaks occur. Although the entire report is processed before the rendering phase, the performance of the rendering extension is significantly impacted by the page size.
    • Using a primary report to operating the parameters and filtering aspects and then passing those parameters to a sub report. This can have a beneficial benefit because it can avoid issues with how parameters and data sets operate.
    • Try restricting your report from first parameter. Sometimes when you select first parameter, based on that you need to fill in a second parameter option set. If there are hundreds of records then also reports will be very slow. In that case remove those parameters, if possible.
    • Limit Text Length and Number of Items in Charts, reports use only some of the possible chart types from Reporting Services. For any chart type, limiting label length and number of items is recommended for the chart contents to be displayed correctly. When Reporting Services displays a chart with long labels, the chart itself becomes too small to be usable.
      • Limit your chart label length, truncating it if it is necessary.
      • Consider limiting the number of items displayed in charts.

    CRM On-Prem Only Suggestions

    • Use the SQL Profiler to measure the performance of all datasets (Reads, CPU and Duration), to determine where your more expensive queries may be happening and identify if they can be tuned.
    • Ensure that you are NOT using the dreaded “SELECT * FROM Table/View” syntax that returns all fields for a table or view. For those of us who are report developers, at first this seems to be the easy way, though retrieving all columns creates a lot of overhead, especially if multiple data sets are using this syntax. Assume you use 7 columns in the tablixlist, change the syntax of the dataset to only return these 7 columns.
    • When comparing dates, use the UTC date fields for comparisons. For example, compare the createdonutc fields and not the createdon fields in a filtered view.
    • Using SQL JOINS
      • One of the best ways to boost JOIN performance is to limit how many rows need to be JOINED. This is especially beneficial for the outer table in a JOIN. Only return absolutely only those rows needed to be JOINED, and no more.
      • If you perform regular joins between two or more tables in your queries, performance will be optimized if each of the joined columns have their own indexes.
      • If you have two or more tables that are frequently joined together, then the columns used for the joins on all tables should have an appropriate index.
      • Avoid joining tables based on columns with few unique values. If columns used for joining aren’t mostly unique, then the SQL Server optimizer may not be able to use an existing index in order to speed up the join. Ideally, for best performance, joins should be done on columns that have unique indexes.

    Additional Considerations to take when optimizing your reports:

    • Do not make a report with a large dataset or a complex SQL query available on-demand to all users. Instead schedule a snapshot in Report Manager during a time schedule when the system is lightly loaded.
    • How the software and reports are being used and if the process can potentially be improved. (IE: Can you replace reports with views and/or dashboards?)
    • If Microsoft CRM for Outlook is used and if users go offline which can tax system resources.
    • Peak usage patterns, understanding which reports are being used when and if those reports can be tuned for optimized performance.
    • You could also opt to create a data warehouse (another database). The drawback is you will have to refresh this data warehouse with your CRM data every few hours.

    For additional perspective on the different options that the Microsoft Dynamics CRM 2011 SDK provides for retrieving data programmatically, check out a recent post by Austin Jones explaining Dynamics CRM 2011 SDK Query Limitations by API.

    If you are interested, our PFE team is ready to help you with this, we can assist with query examples and various other engagements to help you improve your CRM reports and performance. In addition, we have many other services we offer such as reporting workshops, developer training, admin workshops, and code reviews.  If you would like to have another Microsoft PFE or I visit your company and assist with the ideas presented on our blog, contact your Microsoft Premier Technical Account Manager (TAM) for booking information.  For more information about becoming a Microsoft Premier Customer email PremSale@microsoft.com.

    Thanks!

    Sarah Champ

    Microsoft Premier Field Engineer

     


    Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 12

    $
    0
    0

    We're proud to announce that all packages for Microsoft Dynamics CRM 2011 Update Rollup 12 were released on Tuesday, January 29th, 2013 to the Microsoft Download Center!  All packages except Server were released to Microsoft Update on January 21st, 2013.  We plan on releasing the server packages to Microsoft Update on February 12th, 2013.

    Update Rollup 12 Build numbers:

    5.0.9690.3233 (all packages except Server)
    5.0.9690.3236 (Server)

    Update Rollup 12 Microsoft Download Center page

    Here's the "Master" Microsoft Dynamics Knowledge Base article for Update Rollup 12: (KB 2795627). Going forward, the plan is for the Master Knowledge Base article for CRM 2011 Update Rollups to be published a bit in advance of release to aid planning.

    On Thursday, Jan. 31st Greg Nichols and Ryan Anderson from the Microsoft Premier Field Engineering team provided information about:

    • The release of Update Rollup 12 for Microsoft Dynamics CRM 2011
    • New fixes and Service Release functionality made available In Update Rollup 12

    at 10 AM Pacific time on BlogTalkRadio during their Microsoft Dynamics CRM 2011 Update Rollup 12 Podcast.

    Note regarding Podcasts: You can make our CRM Premier Field Engineering podcasts available on Zune by using the RSS feed below.  In the Zune software, go to Collection -> Podcasts and click on the Add a Podcast button on the lower left, then enter the url for the RSS feed: http://www.blogtalkradio.com/pfedynamics.rss. After that, you can adjust the series settings like any other podcast, so you can sync with your smartphone or Zune.

     

    The "CRM Update Rollup Collateral Page"

    For pointers to download locations, release dates, build information, and CRM Premier Field Engineering blogs and podcasts for all Microsoft Dynamics CRM Update Rollups, visit the "CRM Update Rollup Collateral Page"

    See also:

    • My esteemed teammate Shawn Dieken's blog posting: UR12 FAQ and Known Issues, which references a link to a blog by CTS (Commercial Technical Support) describing trending issues being tracked regarding Update Rollup 12
    • My equally esteemed teammate Sean McNellis' blog posting "UR12 vs. Polaris: Commonalities Differences & Improvements" which describes what December 2012 Service Release / Polaris features were released to on-premise customers via Update Rollup 12 and which have only been released to CRM Online customers, with on-premise release planned for later this year

    Big Update Rollup 12 news!

    • UR12 includes the "Microsoft Dynamics CRM December 2012 Service Update"  See:
    • Additional cross-browser compatibility provided
      • The December 2012 Service Update component of Microsoft Dynamics CRM 2011 Update Rollup 12 introduces additional browser compatibility for Firefox, Chrome, and Safari
    • Indexes added to support the Update Rollup 10 Quick Find Optimizations
      • Update Rollup 12 includes new indexes for the following entities in the Quick Find Search Optimization feature. To fully reap the benefits of the platform changes included in Update Rollup 10, indexing is needed.  The indexes created are listed below:
        • Cases
        • Opportunities
        • Competitors
        • Contact (the Phone Number fields)
        • Business Unit
        • Connection
        • Connection Role
        • KB Article
        • Lead
        • Product
        • Sales Literature
      • These indexes are created during the Update Rollup 12 installation and you may notice that part of the installation will take longer to complete. The reason for this is that the indexes need to be populated and based on the size of your dataset the completion time will vary
    • Enhancements to Activity Feeds
      • The enhancements made to the activity feeds include a new feature called Like/Unlike
      • With this feature, you can express your immediate feedback about a post
      • For more information, see Like/Unlike
    • Updated User Experience for Sales and Customer Service and Product Update Functionality for Microsoft Dynamics CRM Online
      • The Microsoft Dynamics CRM December 2012 Service Update introduces a variety of new features and functionality, including an updated user experience. For Sales and Customer Service users, the updated user experience provides a new process flow visualization, which appears at the top of the forms, such as the Opportunity , Lead or Case form. The process flow guides users through the various phases of the sales and customer service processes
      • For trials and subscriptions initiated after December 2012, the updated Sales and Customer Service user experience is included by default. Existing Microsoft Dynamics CRM Online customers have an option of adding the updated user experience to the Opportunity , Lead and Case forms by installing the Product Updates. This lets Administrators install selected feature updates based upon the specific needs of their organizations. The Product Updates are installed by using the Microsoft Dynamics CRM web application; they cannot be installed programmatically
      • For more details, see What's New for Developers for Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online
    • Custom Workflow Activities for Microsoft Dynamics CRM Online
    • Developer Toolkit Support for Microsoft Visual Studio 2012
      • The Developer Toolkit for Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online now supports Microsoft Visual Studio 2012. The installer can be found in the SDK download in the sdktoolsdevelopertoolkit folder
    • Microsoft Dynamics CRM 2011 Software Development Kit (SDK) updated for Update Rollup 12 (version 5.0.13)
    • Bulk Data Load performance enhancements
      • To support bulk data load scenarios, this release introduces the ExecuteMultipleRequest message. This message supports the execution of multiple message requests using a single web method call. ExecuteMultipleRequest accepts an input collection of message requests, executes each of the message requests in the order they appear in the input collection, and optionally returns a collection of responses containing each message’s response or the error that occurred. Processing requests in bulk results in lower network traffic and higher message processing throughput
      • For more information, see Use ExecuteMultiple to Improve Performance for Bulk Data Load
    • Activity Feeds changes
      • Microsoft Dynamics CRM Activity Feeds provide real-time notifications and quick sharing of information through short updates. These updates appear on your personal wall in the What's New area of the Workplace . Activity Feeds enable you to follow and learn about important activities that take place around people, accounts, contacts, leads, and anything else that you care about
      • Updates can be posted manually by you, or automatically based on predefined system rules through a workflow. Activity Feeds can also be posted to by external applications through the Microsoft Dynamics CRM web services API. Activity Feeds expose Microsoft Lync real-time presence functionality so that you can initiate communication activities such as IM, phone calls, and emails. For more information, see Activity Feeds Entities
    • More performance and stability-related fixes, including fixes to the CRM Client for Microsoft Outlook
    • Contains all hotfixes / updates released in earlier Update Rollups
    • Quick Find performance optimizations and EnableRetrieveMultipleOptimization SQL query performance optimizations (originally released in Update Rollup 10)

    For Microsoft Dynamics CRM business solutions that include an entity with a large dataset, record retrieval and grid rendering performance can be negatively impacted for users that do not have global access to all records associated with that entity. Code changes to mitigate this behavior first appeared in Microsoft Dynamics CRM 4.0, and have been fine-tuned since then.

    With Microsoft Dynamics CRM 2011 Update Rollup 10 and later, big advancements have been made to optimize the performance of queries against large datasets by adjusting specific “statistical” settings to address the issue. Should this fail to achieve desired levels of performance, adjust the value associated with EnableRetrieveMultipleOptimization (ERMO) setting. You may have heard these changes described at this year's Convergence.

    A first step in efforts to optimize the performance of queries against large data sets is to make adjustments to the “statistical” settings that affect the behavior of RetrieveMultiple queries. Although you can configure these settings by modifying the Windows Registry (under HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSCRM) on the each of the Web servers that is used in a deployment, we recommend that these settings be configured by using the OrgDbOrgSettings, which will ensure that the configuration applies to a specific organization. For additional information about configuring these settings by using the OrgDbOrgSettings, and to download the tool that makes the OrgDbOrgSettings changes you desire, see the Microsoft Knowledge Base article titled "OrgDBOrgSettings Tool for Microsoft Dynamics CRM 2011" (KB 2691237)

    If making adjustments to these settings does not yield satisfactory levels of performance, then consider adjusting the value of the EnableRetrieveMultipleOptimization (ERMO) setting. The ERMO setting is commonly used to limit the duration of certain long running queries; specifically, to overcome issues related to local or deep business unit access within Microsoft Dynamics CRM 2011 security roles.

    Many more details describing appropriate scenarios for the available settings are already available via the Microsoft Download Center in a revised version of the whitepaper "Optimizing and Maintaining the Performance of a Microsoft Dynamics CRM 2011 Server Infrastructure", in the sections “Optimizing the Performance of Queries against Large Datasets” and “Optimizing the Performance of Quick Find Queries”. The details will appear in the MSDN version of this whitepaper as quickly as possible.

    Notes:

    • Testing Update Rollups: Best Practices
      • Premier Field Engineering recommends treating Update Rollup 12 testing like to a new, major CRM release because of the introduction of new functionality introduced with the December 2012 Service Release. Do all the standard testing like you generally do for all UR’s, but then also all the functional and performance testing that you would do with a new major release
      • The “general rule of thumb” for test plans for Update Rollup installs are:
        • Test any changes in a pre-production environment BEFORE introducing into your production environment. Manage your risk!
        • Consider using the Performance Toolkit for Microsoft Dynamics CRM 2011 to simulate your production user load in your testing environment, to shake out any performance-related issues early
        • Test using the permissions your end-user roles (most restrictive) have. Testing with CRM Administrator permissions, for example, does not give you the complete picture
        • Concentrate on your SDK customizations, JavaScript, ISV add-ons – basically anything that’s not OOB functionality or customizations done from within the UI
    • Microsoft Dynamics CRM 2011 Custom Code Validation Tool
      • Consider familiarizing yourselves with this tool… though the download page mentions Update Rollup 9, it hasn’t had much utility until now since the UR9 changes mentioned in the summary below were never released until UR12:
      • Microsoft Dynamics CRM 2011 Custom Code Validation Tool
      • Use the Microsoft Dynamics CRM 2011 Custom Code Validation Tool to identify potential issues with custom JavaScript in JavaScript libraries and HTML web resources. The Microsoft Dynamics CRM Online Q2 2012 Service Update and Microsoft Dynamics CRM 2011 Update Rollup 9 include significant changes in the web application in order to be able to support a variety of browsers such as Safari, Chrome, and Firefox. When using JavaScript code in Dynamics CRM, it is possible that some code will stop working or cause an error when you upgrade. The Microsoft Dynamics CRM 2011 Custom Code Validation Tool helps identify potential problems so that a developer can fix them.
    • Update Rollup 12 requires Microsoft .NET Framework 4
    • Update Rollup 6 established a new servicing baseline. This will enable uninstalls of some future CRM 2011 Update Rollups, but this also means that Update Rollup 6 is prerequisite for installation of all future Microsoft CRM 2011 Update Rollups starting with Update Rollup 7.
    • A database created with Microsoft Dynamics CRM 2011 Update Rollup 6 or a higher version cannot be imported to a deployment of Microsoft Dynamics CRM 2011 Update Rollup 5 or an earlier version. This scenario is not supported.  Best practice is to import databases or customizations between environments that are at the same Update Rollup level.
    • As Update Rollup 12 is cumulative, containing all changes released in earlier Update Rollup releases, it also contains the Dynamics CRM Q4 Service Update features released via Update Rollup 6.  Some of these features include:
      • Outlook Client Updates:
        • Dialog Enhancements
        • Data Visualization Enhancements:
          • Chart Designer Enhancements
          • New Chart Types
        • Data Management Enhancements to:
          • Auditing
          • Duplicate Detection
        • Activity Feeds
          • Listening in on important activities in Social Media that take place around the people, accounts, contacts, leads or opportunities that you care about, including a Windows 7.5 phone application: "Business Hub"
          • Update Rollup 5 does not install Activity Feeds:

    For more information about the Dynamics CRM Q4 2011 Service Update features, consult:

    Packages will be available for download via:

    UR12 FAQ and Known Issues

    $
    0
    0

    Update Rollup 12 just fully released today, but the December 2012 Service Update has been running in some of our CRM Online deployments for several weeks now.  The Microsoft CRM Support team recently posted a blog article with some of the frequently asked questions and known issues for the December 2012 Service Update and Update Rollup 12 (UR12).  Whether you are using CRM Online or preparing to deploy UR12, I recommend that you review this blog.  They are planning to keep updating this post, so if you are not deploying for awhile, check back later for the most recent updates.

    https://community.dynamics.com/product/crm/crmtechnical/b/dynamicscrmsupportblog/archive/2013/01/28/december-2012-update-has-been-released.aspx

    As always our PFE team is ready to help if you need the assistance.  In addition, we have a plethora of other services we offer such as developer training, admin workshops, and code reviews.  If you would like to have another Microsoft PFE or I visit your company and assist with the ideas presented on our blog, contact your Microsoft Premier Technical Account Manager (TAM) for booking information.  For more information about becoming a Microsoft Premier customer email PremSale@microsoft.com, tell them CRMInTheField or I sent you.

    Thanks!
    Shawn Dieken

    Microsoft Premier Field Engineer

    The plug-in execution failed because no Sandbox Hosts are currently available.

    $
    0
    0

    You have successfully implemented CRM servers and expect your Sandbox service to execute plugins in Isolation mode; however, they fail with an error:

    ERROR:
    The plug-in execution failed because no Sandbox Hosts are currently available. Please check that you have a Sandbox server configured and that it is running. System.ServiceModel.EndpointNotFoundException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #357E9BEE

    Possible Causes:

    • CRM Sandbox service is not running
    • CRM Sandbox ports are unavailable on the sandbox server
    • CRM Sandbox service is missing SPN's
    • CRM Sandbox is remote and the CRM Services cannot be reached

    Potential Solutions:

    • Ensure Sandbox services are running on each Full CRM 2011 Server.
      NOTE: Sandbox services are not required to be on a CRM Full serve role, but by using this option the local CRM platform and Async service will use the local sandbox instead of using one over the network.
    • If you are hosting the sandbox service along with one of the IIS dependent server roles , ensure you have TCP port 808 listed within IIS manager bindings for net.tcp.

      Example: 
       
      Ref- For more port information: http://technet.microsoft.com/en-us/library/hh699823.aspx

    • Check if you have the required SPN’s register against the Domain account used to run the Sandbox account. 
      NOTE: It is best practice to have least privileged account run the Sandbox service. 
    • Example: 
      MSCRMsandboxservice/WebServerName 
      MSCRMsandboxservice/WebServerName.Domain.com 
      Ref- CRM 2011 security consideration article: http://technet.microsoft.com/en-us/library/hh699825 
      Ref- Easy generation of SPN’s for CRM 2011 

    If the issue is not still not resolved please open a support case with Microsoft for additional support.

    Kaustubh Giri

    Microsoft Premier Field Engineer

    UR12 vs. Polaris: Commonalities Differences & Improvements

    $
    0
    0

    Now that UR12 has shipped to onPremise customers we’re starting to get questions on which features were introduced as well as the differences between UR12 and “Polaris.”

    Let’s cover the common features of UR12 and Polaris:

    • Re-tooling of the CRM forms for multiple browsers: while UR12 doesn’t include Flow UI it does include the same cross browser capabilities and benefits.  And for those of you worried about issues with customizations specific to a certain browser, there is a way to restrict which browsers may access CRM (MSDN: http://bit.ly/11BpwOT).
    • Office 2013 Compatibility: the CRM Outlook Client has been updated in UR12 to allow support for Outlook 2013.
    • FIPS 140-2 compliance: http://bit.ly/YpBCWD
    • Performance enhancements: there were performance enhancements across the board. 
      • Query enhancements started shipping as part of UR10 and have continued to be enhanced through UR12.  These enhancements are controllable via an OrgDBOrgSetting referred to as “EnableRetrieveMultipleOptimization” and within this setting you can also control the statistics used, read more about it here start on page 29: http://bit.ly/Tn9nIQ 
      • The web interface: files which allow for the use of deprecated form API calls (CRMForm) are now disabled by default in UR12 (don’t worry, you can turn them back on for supported CRM 4.0 JavaScript see here: http://bit.ly/10hcxfG).  If you’re writing JavaScript  for CRM 2011 be sure to use Xrm.Page instead of CRMForm.
      • Bulk Data API: while the bulk data API itself might not necessarily improve performance of any one given operation, it can be used to combine many operations into a single call to the web service, this can provide very large gains in higher latency environments.  For example, instead of calling the WCF endpoint 1000 times to update a set of contacts, you can instead combine all 1000 updates into a single WCF call.  Each of the 1000 operations still take place behind the scenes, but they can all be submitted in one single call (look for another article from Austin or I on this in the future).
    • Enhancements to Activity Feeds: UR12 will apply an update to Activity Feeds if it’s installed in your environment to enable features such as “like” and “unlike”.
    • Updated look & feel: overall CRM will look very similar but you’ll notice the graphics in the UI are flattened down  and many of the redundant icons are removed to streamline the experience.  Some of the edges and padding have been reduced allowing for more content to be exposed on screen.  Personally, my favorite UI enhancement was the removal of the green spinning wheel which has been replaced by the Windows 8 spinning progress bar (included below for context)

    progress

    While UR12 has most of the same features there are some that differ with regard to CRM Online today, they are as follows:

    • “Flow-UI”, a new process driven user interface style/paradigm for sales entities today in CRM Online.
    • Yammer Integration
      • This feature is coming soon and will offer a tighter integration between CRM and Yammer beyond the current embed functionality. This will enable features such as Like, Follow, visible from within CRM or Yammer and the ability to do global search from yammer to CRM.
    • CRM Online custom workflow activities
      • CRM On Premise had this capability at RTM and now this can be used by CRM Online customers as well.
    • Skype Outbound Call Integration
      • Ability for outbound “click to call” and CRM will create the phone activity to represent the call
    • Bing Maps “Out of the box” integration
      • This has been available to all CRM customers for a long time by including Bing maps in an iFrame and controlling the map experience through JavaScript, however CRM Online now offers the ability for an out of the box configurable Bing Map control.

    As you can see, the features are largely the same and while Online has a few extra enhancements most can be accomplished in an onPremise environment with a few customizations. For more information look for updates to the Statement of Direction and future Release Preview Guides. The most recently release preview guide (December 2012) can be found here: http://bit.ly/WkgXoe. Also check out the UR12 podcast & blog entry from our very own PFE Greg Nichols for more details on all UR12 has to offer.

    As always our PFE team is ready to assist with code samples and various other engagements as you update your CRM environments. If you would like to have another Microsoft PFE or I connect with you and assist with the ideas presented on our blog, contact your Microsoft Premier Technical Account Manager (TAM) for booking information. For more information about becoming a Microsoft Premier customer email PremSale@microsoft.com, tell them CRMInTheField or I sent you.

    Thanks!
    Sean McNellis

    More juicy details on Dynamics CRM 2011 Asynchronous Service’s maintenance jobs

    $
    0
    0

    You're likely aware that the Dynamics CRM 2011 Asynchronous Service regularly executes multiple internal maintenance jobs for each organization (database) and that these are scheduled initially at the time of organization creation on default frequencies (daily, monthly, etc.). Hopefully, you're also aware of the need to reschedule these jobs to execute during non-peak usage hours so as to minimize impact on system performance. If not, I urge you to review our previous blog post that discusses a tool created by one of our team members for this exact purpose, the CRM 2011 Maintenance Job Editor (http://crmjobeditor.codeplex.com).

    Earlier we took an in-depth look at one of the more intriguing maintenance jobs in particular, the Deletion Service. But what about those other jobs? For those curious types like myself, here are the juicy details:

    UPDATE: The DeletionService and ReindexAll operations were modified slightly in the UR12 release. Additional details have been noted in the table below

    UPDATE #2: The DeletionService operation was modified again in the UR16 release. The table has been updated to reflect this change. 

    Maintenance Job

    Operation Code

    Purpose

    Default Frequency

    DeletionService

    14

    In CRM 4.0, this operation had a more prominent role in that it was responsible for all physical data deletion which occurred asynchronously, but that role has been greatly diminished in 2011 since all entity data is physically deleted immediately. It now performs periodic cleanup of artifacts that were previously associated to deleted entity records such as matchcode, sync subscription, and POA records as well as the deleted object tracking records themselves.

     

    UR12: With the UR12 release, the DeletionService maintenance operation now cleans up subscription tracking records for deleted metadata objects as they expire.

    UR16: With the UR16 release, the DeletionService maintenance operation added a step to cleanup orphaned attachment records.

    Daily

    IndexingManagement

    15

    Validates that system-managed indexes exist for all entities and recreates any missing indexes.

    Daily

    ReindexAll

    30

    Reorganizes/rebuilds fragmented indexes depending on the amount of fragmentation, and performs a DBCC SHRINKDATABASE command to release unused physical drive space for both database and transaction log files.  The latter works well for CRM Online organizations where drive space allocation is governed, but for on-premise environments we generally recommend postponing this job to essentially disable it (next run 1/1/2099) and opt for implementing your own index maintenance routine that does not shrink the physical files.

     

    UR12: With the UR12 release, this maintenance job has been modified to no longer shrink the database/log files as part of the operation. Thus any on-premise installation can now assess the necessity of this job based on the merits of your index maintenance strategy alone.

    Daily

    CleanupInactiveWorkflowAssemblies

    31

    Seeks custom workflow assemblies that are no longer referenced in workflow rules or in-process jobs. Those unreferenced assemblies are then deleted. Consider the scenario where you register version 2.0 of a custom workflow assembly.  You may update your rules to reference the new version, but some in-progress jobs may still be referencing version 1.0.  Once those jobs have completed, this maintenance job will clean up the version 1.0 assembly that is no longer referenced by rules/jobs. 

    Daily

    AuditPartitionCreation

    41

    Alters the partitioning scheme for the auditbase table (SQL Enterprise only).

    Monthly

    CheckForLanguagePackUpdates

    42

    Detects upgrades to language (MUI) packs and schedules additional async operations to perform individual language provisioning.

    Daily

    (UR10+) RefreshRowCountSnapshots

    46

    Refreshes the Record Count snapshot statistics leveraged in UR10's enhanced query plans.

    Daily

    (UR10+) RefreReadSharingSnapshots

    47

    Refreshes the POA read snapshot statistics leveraged in UR10's enhanced query plans.

    Daily

     

    Remember, since the above jobs are technically internal operations, they are subject to change without notice. We'll do our best to keep this article updated on any changes we identify in future updates. If you'd like to see the Deployment SDK extended to provide API's for managing the above operations, please make your voice heard by signing up for Dynamics Suggestions on Microsoft Connect and vote for this feature hereAnd, while you're on Dynamics Suggestions take some time to vote on other feedback or create feedback of your own.

    Austin Jones

     

    Microsoft Premier Field Engineer

    Viewing all 458 articles
    Browse latest View live


    <script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>