CRM Online & SharePoint Online Document Management Setup

Way back in the year 2011 (time flies), I wrote an article on setting up Microsoft Dynamics CRM Online document management with SharePoint Online in an Office 365 scenario.

https://edwardsdna.wordpress.com/category/sharepoint

Today I had the occasion to configure the same and found that although the setup was essentially the same, the steps changed slightly.  Since I was doing the work, I thought I would share what’s changed. 

As before, there are a couple of things you need to get started:

  • Sign up for an Office 365 E3 or E4 Trial Plan
  • Complete the steps to add CRM Online if you haven’t already and launch CRM Online to ensure everything is working as expected.  This can actually be a bit tricky for first time users so have a look at this nice trial guide that Microsoft put together if you need some assistance.
  • Download the SharePoint 2013 List Component and run it to extract the contents to a folder
    Once you’ve completed the items above, you are ready to get started.
  • Log into Office 365 and select Sites from the upper right menu bar

image

image

  • Select Site Settings

image

  • Select Solutions

image

  • Select Upload Solution

image

  • Select Choose File

image

  • Select the file named crmlistcomponent.wsp from the folder where you extracted the list component files

image

  • Select OK

image

  • Select the Activate button and wait for the activation process to complete

image

  • The process may take a few minutes to complete

image

  • It will look like this when completed

image

Next we need to configure the CRM Online site to integrate with SharePoint

  • Select CRM from the top navigation menu

image

  • Select Settings from the left navigation menu and select Document Management

image

  • Select Document Management Settings

image

  • Select the entities you would like to enable for Document Management, paste the SharePoint Team Site URL that you saved from the previous step into the URL field and select Next
  • Wait for the validation of the URL to Complete.  If it completes with a warning that the list component is not activated go back and activate the SharePoint List component again as described above

image

  • Leave the Based on entity button unchecked and select Next *

image

  • Select Ok

image

  • Wait for the setup to complete and select Finish

image

You are now ready to add and manage your documents from CRM.  Check out the CRM Community Resource Center or your help files for more information.

* You can select the Help button to learn more about the Document Management folder structure.

References:

Scenario 7: Set up Microsoft Dynamics CRM Online to work with Office 365 SharePoint

CRM Outlook Client Ribbon not Displaying

I recently ran into a CRM 2011 Outlook Client issue that I had not previously seen.  In this scenario, the CRM Ribbon would not display while everything else worked in the Outlook Client as expected: could view the CRM folders, views, open records, etc..  Additionally, CRM was not throwing any errors so there were no errors written to the log files.

I tried several of the usual troubleshooting steps to include, deleting the Outlook Temp files, disabling unused add-ins, completely uninstalling and reinstalling the CRM Outlook Client…… 

When I ran out of things to try, I opened a ticket with Microsoft support and they let me know that they have seen this issue in relationship to a product called Websense.  It appears that if Websense is enabled but does not have the latest version / update installed, it can interfere with the CRM Outlook Client.  The fix for this issue is to ensure Websense is running with the latest update.  If that doesn’t work then you will need to disable it. 

I hope this saves you some time if you run into this issue.

Cheers

Configuring Cascading Entity Relationship Behavior

As we know, CRM is a highly configurable application.  One of the configurable options is to configure the behavior of related records when a CRM record is assigned, merged or some other action is taken.  This is a very important concept in CRM because the decisions and actions you take will affect your Organization’s data. 

By default, when you install CRM,  the cascading relationship of entities is generally set to Parental for actions like Assign, Share, Unshare, Reparent, etc. where there is an option to modify the relationship behavior.  Some entity relationships are not available for modifications because there are System dependencies.  The “Type of Behavior” will appear as System and you will not be able to modify those relationship behaviors. 

So what does this mean?  Let’s use the Contact entity as an example to understand how cascading behavior impacts CRM data.  

A common action that users might take on a Contact record is to reassign the record.  By default, that means that when a Contact record is reassigned to someone else (ownership change) other related record ownership will also be updated to the new Contact owner.  Ownership for related records like a Case, E-mail, Task, etc. will change to the new Contact owner for those records that are in an Active or Open status.  This can be confusing for the end user when viewing the records because it can appear that someone different from the original owner (created by) created the record.  We can modify this behavior to alleviate the confusion and ensure that the related record maintains its original owner. 

Here are the steps to configure the cascading behavior of the Contact entity relationship with the E-mail entity.  This examples assumes that you know how to open the Contact entity to customize it.

From the Contact entity, select 1:N Relationships.  Find the row named Contact_Emails and open it.  Notice that the default behavior is set to Parental.

image

After opening the relationship record, select Type of Behavior and change it from Parental to Configurable Cascading.

image

Change the remaining behaviors from Cascade All to Cascade None.  Save your changes and Publish. 

image

You can repeat these steps for other entities like Accounts, Cases and their relationships with Activities and other CRM entities.

Generally speaking, when I install a CRM application, I modify the system to set the cascading relationship of related Activities (E-mail, Appointments, Phone Calls, etc.) to System Configurable, change the behavior from Parental to Configurable Cascading, and set the Assign, Share, Unshare, and Reparent behavior to Cascade None. 

Now that we have CRM 2011, this is much easier to manage as we can create a ‘Default Solution’ that contains the default Cascading behavior desired and import that into each new CRM implementations as a starting point for the project.  This is a significant productivity gain.

If you would like to learn more about CRM Customization, check out the 11 Things to know about Customization on the Resource Center.  See # 5 for more information about Cascading Behavior.

Cheers

Migrate CRM SQL 2005 32 bit to SQL 2008 64 bit Environment

I recently migrated a Dynamics CRM 4 implementation installed on a Windows Server 2003, 32 bit environment to a Windows Server 2008, 64 bit environment.  I decided to document the process in the event that the information might be helpful.

Please keep in mind that CRM environments vary and the steps you take to complete a similar migration might vary depending on the environment that you’re migrating.

image

  • If you receive the following message

image

  • You must enable .Net Framework 3.5.1 from Server Manager
  • Select Features, Add Features

image

  • Select to Add Required Features

image

  • Select Next & Install
  • From the SQL media, right-click the Setup Application and select Run As Administrator
  • If you see the following, select the option to Check for Run the Program
    • You’ll need to install SQL 2008 SP 2 after you finish the install
  • Review through the articles & run the Tools from the SQL Installation Center (at a minimum)
    • Security Documentation
    • Online Release Notes
    • System Configuration Checker

image

  • Select “Installation” from the left navigation menu of the SQL Installation Center Window
  • Select “New SQL Server…….

image

  • Walk through the Installation Setup Wizard
  • Complete the installation by selecting the correct options
  • Open SQL Management Studio and ensure the settings are as expected
  • Download & Install SQL 2008 SP2
    • or the latest SP for SQL 2008
  • Ensure you can access the Report Server
  • Install .Net Framework 3.5 feature if it is not already added
    • Open Server Manager
    • Select Features
    • Select Add Features
    • Select .Net Framework 3.5.1
    • Select Install
  • Install IIS 7 if it is not already added
  • Install IIS 6 Compatibility components if they are not already added
    • Open Server Manager
    • Select Roles
    • Right-click Web Server (IIS)
    • Select Add Role Services
    • Select IIS 6 Metabase Compatibility and IIS 6 Management Console
    • Select Install
  • See Support for Microsoft Dynamics CRM 4.0 on Windows Server 2008-based computers for a list of all 2008 Server Roles required and troubleshooting tips
  • Download & Install the CRM Application
    • Select the option to Run as Administrator by right-clicking setupserver.exe.
      • Be aware that the user login used to install CRM will, by default, be assigned a System Admin user account
      • This will help to minimize any unexpected rights issues
      • Select Update Installation files when you receive the prompt
    • Open CRM from the IE browser to confirm everything is working as expected
    • Follow-up with any final changes need documented
    • Apply the Update Rollups that match your current CRM installation
      • This is a good time to get your CRM applications updated to the latest or close to the latest Update Rollup release for all components
        • SSRS, E-mail Router, Server…
    • Open CRM and ensure everything is working
    • Check the Event Viewer and address any errors in the Application Log
  • Review the steps in this article to move your CRM application from one server to another and save for reference as needed
    • See the section, “Redeploy the Microsoft Dynamics CRM deployment that includes the Microsoft Dynamics CRM Server within the same domain or to another domain.”
  • Prep Work before attempting the Import
    • Ensure all Custom Code to include Plug-Ins and other customization is removed from the database.  This will increase your chances of having a successful import.  The current Organization database should be in a fully supported state.
    • Ensure you have at least rollup 8 on both servers (your current CRM server and the server where you plan to run the import
      • You may need to right-click the Update Rollup file and select Run as Administrator
    • Ensure the database on the new server is set to Simple Recovery mode and your log files are set to allow for growth
      • You can change these settings as needed after the import is completed.
    • Set the registry key on the new CRM server as explained in KB Article 977867
    • Ensure the users who are performing the restore have full permissions on the SQL and CRM server directory files
  • Backup your current Organization database and place the backup in a directory that you can access from the new CRM machine.
    • You only need to back up the CRM Organization database, OrgName_MSCRM. 
      • Do not backup the MSCRM_CONFIG database
    • Restore the OrgName_MSCRM to the new SQL Server.
      • I am not going into the restore steps in this article with the exception of mentioning that you should not select to overwrite the existing database when you do the restore of select any of the other checkmarks available on the Options page. 
        • Once you have a successful Organization Import, you can come back to SQL and remove the initial (temp) database that was related to the initial CRM installation as you will no longer need it. 
      • Restart your SQL machine or the services to ensure everything is working as expected.  I prefer to reboot the machine(s) to ensure everything is working as expected
      • Ensure you can still access CRM from the Web browser
        • Check the Application Log on the Event Viewer and resolve any issues
        • You want to ensure both your SQL and CRM environments are working as expected.  If both applications are on machine then you have only one environment to check.
  • Open Deployment Manager on the CRM machine
  • Select Organizations from the left navigation menu
  • Select Import from the right navigation menu

image

  • Walk through the Import wizard.  It is fairly self explanatory. 
    • Select Yes to Create a new Organization
    • Enter the SQL server name where you restored the OrgName_MSCRM backup
    • Select the Organization Database from the drop down
    • Select Next and enter your Display Name
      • This will be your CRM Organization name so you may want to keep it the same as your existing Organization. 
    • Select Next and enter your Report Server URL http://CRMSqlServerName/ReportServer
    • Select Next and leave the default Auto Map Users
      • Unless you need a different option
    • Select Next and resolve any errors related to disabled users or users still in CRM but no longer in Active Directory.
      • Review the User Mappings as needed and select Next
      • Select Yes to this message unless you want to make additional changes to the User Mapping
    • Select Next and resolve any Errors that display on the System Requirements dialog window
      • You will receive the warning, “The organization database selected for import is a different version than the organization database that is currently deployed.”
        • It is ok to ignore it
    • Select Next and review the settings to confirm it is what you want
    • Select Import and wait for the Import to complete
  • Timeout Errors
    • How to resolve a timeout issue related to the following errors
      • Microsoft Dynamics CRM 4.0 – Importing Organization fails with “The connection’s state is closed”
      • There are several steps in the article to include obtaining a hotfix.  Take all applicable steps
      • Restart the server as instructed and try the Import again
      • The following KB addresses other timeout error messages
      • Ensure you have full rights to the CRM Directory folders.
        • I’ve found that sometimes adding the installing user to the Administrative Group is not sufficient.  In those cases, I add the CRM installing user to the CRM Directory folder by right-clicking the folder, selecting Properties, selecting the Security tab, add the user and give the user Full Control rights.
    • Always reboot the CRM server after these types of changes and check to ensure everything is working as expected when the server comes back online
      • Open the CRM application to ensure it is working, check the Application Log for errors, etc.  This helps to ensure you are working with a stable environment.
    • Certain custom reports can sometimes result in the error “The connection’s state is closed”

Importing a Dynamics CRM SQL 2005 Org into a SQL 2008 Database

I’ve been testing the process of importing a CRM Organization created against a SQL 2005 database into a SLQ 2008 database and I was pleased to find that the import worked like a charm once I overcame an issue related to Reports. 

At first, the issue was not obvious to me since the error I saw in the log file was the following:

“Error| Import Organization (Name=CRMTestNew, Id=3052bc2b-97f1-df11-aab3-001e0bdd41d0) failed with Exception:
System.InvalidOperationException: ExecuteNonQuery requires an open and available Connection. The connection’s current state is closed.”

Based on the above error, I assumed there was a timeout issue so I made the recommended changes to the registry and config files, restarted the machine and tried again without success.  After trying the import a couple of times without success, I searched the Internet for solutions and came across this post on the Dynamics Forum that helped. 

After taking a closer look at the log file related to the import, I noticed that a report was listed just before the error.  Although the report did not appear to have any error related to it, I tried the solution recommended, deleted the report from the database and tried again but the import still failed.  In reviewing the log file again, I found a different report just before the error so I deleted that report as well and this time the import was successful.

In the event that this helps someone, below is the error message, error log location and file name:

Path = C:\Documents and Settings\LoggedOnUserRunningTheImport\Application Data\Microsoft\MSCRM\Logs

File name = crm40dmsnapin.log

Error Message:

Error| Import Organization (Name=CRMTestNew, Id=3052bc2b-97f1-df11-aab3-001e0bdd41d0) failed with Exception:
System.InvalidOperationException: ExecuteNonQuery requires an open and available Connection. The connection’s current state is closed.
   at System.Data.SqlClient.SqlConnection.GetOpenConnection(String method)
   at System.Data.SqlClient.SqlConnection.ValidateConnectionForExecute(String method, SqlCommand command)
   at System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Microsoft.Crm.CrmDbConnection.InternalExecuteNonQuery(IDbCommand command)
   at Microsoft.Crm.CrmDbConnection.ExecuteNonQuery(IDbCommand command, Boolean impersonate)
   at Microsoft.Crm.CrmDbConnection.SetTransactionIsolationLevel(IsolationLevel il)
   at Microsoft.Crm.CrmDbConnection.Dispose(Boolean disposing)
   at Microsoft.Crm.SqlExecutionContext.Dispose(Boolean disposing)
   at Microsoft.Crm.SqlExecutionContext.Dispose()
   at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.Import(Guid organizationId, String organizationUniqueName, String organizationFriendlyName, String sqlServerName, String databaseName, Uri reportServerUrl, String privilegedUserGroupName, String sqlAccessGroupName, String userGroupName, String reportingGroupName, String privilegedReportingGroupName, ICollection`1 users, MultipleTenancy multipleTenancy)
14:35:53|Warning| Attempting to cancel a long running process: ProgressWizard. This might leave the data in an invalid state and the application might not function correctly.
07:32:34|Warning| Attempting to cancel a long running process: FinishWizard. This might leave the data in an invalid state and the application might not function correctly.

Optimizing and Maintaining Microsoft Dynamics CRM 4.0

A new CRM 4 Optimization document was published.  The document contains information on how to optimize your installation for best performance.  This is a good read even if you aren’t experiencing performance issues. 
 
Happy Reading
 
 
This white paper provides techniques, considerations, and best practices for optimizing and maintaining the performance of Microsoft Dynamics CRM 4.0 implementations. Structured to support a tier-based optimization methodology, the paper includes a section dedicated to optimizing and maintaining each of the Client, Application, and Data tiers. For each tier, the paper addresses the relevant components of the broader implementation. This white paper also includes links to additional information and resources, such as performance enhancements, security updates, Knowledge Base articles, and related Microsoft Dynamics CRM documentation.