Thursday, December 13, 2012

Error during formLoad Access is denied in CRM 2011

 

Hi.
I would like to share some information with you regarding a little error message that you might stumble on if you have CRM 2011 and enable document management.

If you get an error message from the webpage during form load in CRM 2011 then you might be having the same problem as I just had.

The error message is
Error during FormLoad Access is denied

access_denied_formLoad

This error was generated because the CRM Server was configured with document management and the URL for the SharePoint server was not configured with FQDN (http://SharePointServer) and the users access CRM with the server name in FQDN format (http://crmserver.domain.com)

To resolve this you should use the same format for your SharePoint URL and your CRM URL.

Like http://SharePointServer and http://crmserver
This will place the URLs in the same security zone in Internet Explorer (if your admin has not configured any special IE Policy restrictions)
All URLs that you access without FQDN format will be placed in the Local intranet Zone in Internet Explorer by default

If you click to open the document location in your CRM form within the left navigation area you might also see a warning message from Internet Explorer like the following

image

 

I hope this is helpful for some one else as well Ler

Happy troubleshooting!

//Hans

Wednesday, November 7, 2012

Protect CRM 2011 data with Transparent Data Encryption


In this post I will provide you with a little example on how to protect your Microsoft Dynamics CRM Organization database with SQL Server Transparent Data Encryption (TDE).

If you want to protect your database even the backup files so that no one will be able to take one of your backup files or disks and just move it to another SQL server and be able to get the information from your system you should use TDE to encrypt your database.
TDE will not encrypt data sent over the network!
Do not use this in production without reading more about it first!
Make sure you know enough to maintain it and know all about TDE before you use it in production.

In SQL Server 2012 Enterprise Edition you can try this out.

USE master;
GO
CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'SuperPassword';
GO
CREATE CERTIFICATE ServerCertificate WITH SUBJECT = 'Server Certificate DEK';
GO
USE CRMORG_MSCRM;
GO
CREATE DATABASE ENCRYPTION KEY
WITH ALGORITHM = AES_128
ENCRYPTION BY SERVER CERTIFICATE ServerCertificate;
GO
ALTER DATABASE CRMORG_MSCRM
SET ENCRYPTION ON;
GO

Encryptions you may choose from are
DES, Triple DES, TRIPLE_DES_3KEY, RC2, RC4, 128-bit RC4, DESX, 128-bit AES, 192-bit AES, and 256-bit AES

It’s very IMPORTANT to backup you certificate ServerCertificate.
Without the Certificate backup you will not be able to use your database files / backup files if the server crash and burns, or if you need to recover your data.

After you run the following SQL commands the backup files will be placed in your MSSQL\Data folder. Make sure to back these up to a secure location.

USE master
GO
BACKUP CERTIFICATE ServerCertificate
TO FILE = 'ServerCertExport'
WITH PRIVATE KEY
(
FILE ='PrivateKeyFile',
ENCRYPTION BY PASSWORD ='YourOtherStrongPassword'
);
GO

Note* if you use TDE on any database in you SQL instance the TempDB will also be encrypted. This might have an impact on performance.

If you lite to read more about TDE you can start with these pages on MSDN.
About TDE.
http://msdn.microsoft.com/en-us/library/bb934049.aspx

About Encryption keys.
http://msdn.microsoft.com/en-us/library/ms345262.aspx

Be safe!

//Hans

Wednesday, October 24, 2012

Installing CRM 2011 SSRS Data Connector on Windows Server 2012


I will share some information with you about installing CRM 2011 SSRS Connector in Windows Server 2012. You might already have customers that use SQL Server 2012 and Windows server 2012.
Lets say you want to install SQL 2012 on a Windows Server 2012 and then use SQL Server 2012 Reporting Services for your Microsoft Dynamics CRM 2011 server.
Even though CRM 2011 is not supported with Windows Server 2012 yet.

During the installation of CRM SSRS Connector you will get an error.
The error message is Windows Identity Foundation Installation failed
The error looks like this.
error Win 2012 server

To get around the setup error you must add Windows Identity Foundation from Features. In Windows Server 2012 WIF is a Server feature. So just add the feature.
wif

After you have added the Feature you can run the setup again.

ReportConnectorSuccess
Next the setup will continue to install Microsoft .Net Framework 4 if it’s not already installed.
Remember that Windows Server 2012 is not supported for CRM 2011 yet.
Check out Microsoft Dynamics CRM 2011 Compatibility list to see the versions that are Supported. http://support.microsoft.com/kb/2669061
I really look forward to learn more about Windows Server 2012 !
And I’m currently spending my evenings with SQL 2012 preparing for exam 70-462.
So much new things to learn, really exciting Ler
Cheers!
//Hans

Tuesday, October 2, 2012

Limit or no limit using CRM 2011 Quick Find queries

In CRM 2011 Rollup 10 there is a new system setting where you can choose to limit or not to limit the amount of records that is returned by quick find.
The default setting is to limit the records returned when users search using quick find queries.
As a best practice this should also be limited as it might impact performance of CRM if users do these kind of Quick Find queries.
Users should be using advanced find when searching for records that returns more than a few results.
If you choose to disable the limit for quick find queries you will find the setting under Administration / System settings and in the bottom of the general tab you can select “no”
quickfind  
The limit is 10,000 records
If a user performs a Quick find that returns more than that an error will be displayed
error quickfind
Error
The Quick Find limit is exceeded. Narrow your search by entering a longer query, or use Advanced Find.
But there might be business requirements to disable this limit and now you can do it from the System settings.
Hope you find this information helpful!

Wednesday, September 12, 2012

CRM 2011 Better performance for dashboards and advanced find


Recently Microsoft released an updated implementation guide.
I read an interesting note in there about the groups that are created by the CRM 2011 installer.
An new account is added to the SQL server called MSCRMSqlClrLogin.
mscrmsqlclrlogin

This account is used for time zone conversions when you use dashboards, charts and also when using advanced find.
But only when SQL server is enabled to use CLR. As Microsoft says this can significantly improve performance for these features.
To enable CLR in SQL Server you need to run the following query in SQL Management Studio.
sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'clr enabled', 1;
GO
RECONFIGURE;
GO
Also make sure you are not using lightweight pooling in SQL server before you activate CLR. This is not supported with CLR enabled.
I hope this helps! Cheers

Monday, August 6, 2012

CRM Workflows Stuck in a Waiting State

Why some Workflows is stuck in a waiting state and a Generic SQL error is logged.
I resently had an issue at one of our customers with workflows in Micorosoft Dynamics CRM 2011.
If we triggered multiple instances of a workflow some got stuck in a waiting state, not all.
If we triggered the workflow on one record it worked.
So you might be facing the same issue as i did.
If you open up the waiting workflow under system jobs in CRM 2011 you might see an error like the following.
Workflow paused due to error: Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Generic SQL error.Detail: 
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
  <ErrorCode>-2147204784</ErrorCode>
  <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
  <Message>Generic SQL error.</Message>
  <Timestamp>2012-06-15T08:47:45.7210596Z</Timestamp>
  <InnerFault>
    <ErrorCode>-2147204784</ErrorCode>
    <ErrorDetails xmlns:d3p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
    <Message>Generic SQL error.</Message>
    <Timestamp>2012-06-15T08:47:45.7220362Z</Timestamp>
    <InnerFault>
      <ErrorCode>-2147220970</ErrorCode>
      <ErrorDetails xmlns:d4p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
      <Message>System.Data.SqlClient.SqlException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #E0E9194D</Message>
      <Timestamp>2012-06-15T08:47:45.7308256Z</Timestamp>
      <InnerFault i:nil="true" />
      <TraceText i:nil="true" />
    </InnerFault>
    <TraceText i:nil="true" />
  </InnerFault>
  <TraceText i:nil="true" />
</OrganizationServiceFault>
   at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Update(Entity entity, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType)
   at Microsoft.Crm.Extensibility.InprocessServiceProxy.UpdateCore(Entity entity)
   at Microsoft.Crm.Workflow.Services.UpdateActivityService.<>c__DisplayClass1.<UpdateInternal>b__0(IOrganizationService sdkService)
   at Microsoft.Crm.Workflow.Services.ActivityServiceBase.ExecuteInTransactedContext(ActivityDelegate activityDelegate)
   at Microsoft.Crm.Workflow.Services.UpdateActivityService.UpdateInternal(Entity entity, String stepId)
   at Microsoft.Crm.Workflow.Services.UpdateActivityService.ExecuteInternal(ActivityContext executionContext, UpdateEntity updateEntity)
   at Microsoft.Crm.Workflow.Services.UpdateActivityService.Execute(ActivityContext executionContext, UpdateEntity updateEntity)
   at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
   at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
This can error can be logged because of deadlock issues in the CRM organization database when you run multiple workflows at the same time.
You can run SQL Server profiler and trace locks to confirm that this is the reason for the error.
An excellent way to handle deadlock issues with Microsoft CRM is to activate the following for you CRM organization database.
SET READ_COMMITTED_SNAPSHOT ON
SET ALLOW_SNAPSHOT_ISOLATION ON

Make sure you have your SQL server tempdb on storage some extra space available for the tempdb because the tempdb will be used more by SQL server when you activate the above.

Friday, August 3, 2012

CRM 2011 Email Router for CRM Online

How to Configure CRM 2011 Email Router Deployment tab for CRM Online.

If you want to use CRM 2011 Email Router with CRM Online you might have a hard time to configure the Deployment tab in Email Router Configuration Manager.

The first thing you need to find is you CRM Online organizations unique name witch is not so easy if you don't know where to look :)

The CRM Online Organization Unique Name is listed in your CRM Online under Settings / Customization /Developer Resources


When you have your CRM Online organization Unique Name you can move on to CRM Email Router Configuration Manager.

The URL to CRM Online will be similar to the image below.
Deployment is Microsoft Dynamics CRM Online
Microsoft Dynamics CRM Server should be entered in the following format
https://dev4.crm4.dynamics.com/YourOrgUniqueName

The URLs to CRM Online is different depending on you location.

https://dev.crm.dynamics.com/ (North America)
https://dev.crm4.dynamics.com (EMEA)
https://dev.crm5.dynamics.com/ (APAC)

Username = Live ID for a CRM Online account in your organization.
Password = password for the Live ID


The incoming and outgoing profile configuration is the same as if it was an on premise installation of CRM 2011.

The configuration of incoming and outgoing email settings for
users and queues in CRM is the same as on-premise. No difference for Online and
on premise.

Good luck!

Monday, July 30, 2012

CRM 2011 Error Creating New Organization

You get an error while creating a new organization in CRM 2011.
A non valid page number was received: 0 is displayed on the screen.
The CRM Log is showing the following error message.
Error| System.Exception: Action Microsoft.Crm.Tools.Admin.PopulateDependencyNodesAction failed. ---> Microsoft.Crm.CrmException: A non valid page number was received: 0
 at Microsoft.Crm.BusinessEntities.PagingHelper.AddPagingFilters(EntityExpression entityExpression)
 at Microsoft.Crm.BusinessEntities.BusinessProcessObject.DoRetrieveMultiple(BusinessEntityCollection entities, EntityExpression entityExp, DatabaseQueryTarget queryTarget, ExecutionContext context)
 at Microsoft.Crm.BusinessEntities.BusinessProcessObject.RetrieveMultiple(EntityExpression entityExpression, DatabaseQueryTarget queryTarget, ExecutionContext context)
 at Microsoft.Crm.ObjectModel.DependencyNodeService.CreateDataNodes(Int32 componentType, ExecutionContext context)
 at Microsoft.Crm.ObjectModel.DependencyNodeService.CreateAllDependencyNodes(ExecutionContext context)
 at Microsoft.Crm.Tools.Admin.PopulateDependencyNodesAction.Do(IDictionary parameters)
 at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
 --- End of inner exception stack trace ---, Error, RetryCancel, Option1
This error occures if you for some reason have enabled the registry key TurnOffFetchThrottling in the CRM server.
To be able to create the organization, set registry key value to 0 when you get the error message and then hit retry this will get you trough the new organization wizard in CRM 2011 Deployment manager.
I have confirmed that this issue is still occur in CRM 2011 Rollup 8
I hope this is helpful.

Friday, July 27, 2012

Convert Entities to Managed Solution Fails

After Microsoft CRM 2011 Rollup 6 you might be facing a problem when you try to import a solution as managed where the target system contains those entities as unamnaged.

The process of converting entities to managed solution fails if you have custom attributemaps.
The error you get is similar to the following.
Found 1 dependency records where unmanaged component is the parent of a managed component. First record (dependentcomponentobjectid = 6d680c43-f66c-e111-a4d0-005056b20fcf, type = AttributeMap, requiredcomponentobjectid = 58765635-f66c-e111-a4d0-005056b20fcf, type= EntityMap, solution = 559bf67b-6e7a-4b68-a4a2-efa4b8fffdd1).
This scenario can happen after you upgrade from CRM 4.0 to CRM 2011 and you have your ISV solution in CRM 4 that you now want to be a managed solution in CRM 2011.

Consider this scenario:
You have a system with entity E3 and entity E4
Entity E3 is the parent of entity E4
The N:1 relationship contains an attribute mapping between the name fields
If you first install this solution as unmanaged, and then try to install it as a managed solution the conversion to managed solution fails on the dependency check
With an error simular to this:
Found 1 dependency records where unmanaged component is the parent of a managed component. First record (dependentcomponentobjectid = 6d680c43-f66c-e111-a4d0-005056b20fcf, type = AttributeMap, requiredcomponentobjectid = 58765635-f66c-e111-a4d0-005056b20fcf, type= EntityMap, solution = 559bf67b-6e7a-4b68-a4a2-efa4b8fffdd1).
To reproduce the issue take the following steps:
Step 1: import the unmanaged solution and publish all.
Step 2: delete the solution,(not the entities) so you can import the managed solution.
step 3: import the managed solution.
Result: This fails. (Before Rollup 6 it works)


You use these solutions at your on risk! Make sure you try it out first in a dev environment so that you can confirm you get the result you want from it. Always make sure you have backups!


Solution 1
If you remove the attribute mappings from the managed solution the import works in your environment.
Drawback: If you want to continue to install new versions of you managed solution in to the target system it will fail if you have attributemappings in the managed solution.

Solution 2
Remove the custom attributemaps in the target system from the entities you want to convert to managed.
Import the managed solution without your custom attributemaps.

Edit the solution.xml in you managed_solution.zip file to comment out the extra attributemaps and then create a new manages_solution.zip


Once the entities is converted to managed you can do a second import this time with your custom attributmaps.

Select overwrite customization


From now on you will be able to import new versions of your solution without making any changes to the attributemaps.

Drawback: You need to know some XML and be careful!

Monday, July 23, 2012

An Error Occurred in the Script on This Page

An error occurred in the script on this page in CRM 2011.

You might have users that are complaining about Script errors suddenly appearing in Microsoft Dynamics CRM 2011.

The Script error messages looks similar to this.
An error has occurred in the script on this page
Do you want to continue running scripts on this page?


This can occurre after you install a CRM 2011 Rollup.

To get rid of this script error you just need to delete your temporary internet files in
Internet Explorer

Open Internet Explorer
Go to Tools / Internet Options
click on Delete under Browsing history and make sure Temporary Internet files is checked as the image below shows


The rest can be unchecked so you don't lose any other things you might want to preserve.

As a best practise you should always remove Temporary Internet files after you install Microsoft CRM 2011 Rollups as Microsoft also recommends in their KB Articles for Rollups.

I hope this helps :)

Friday, July 20, 2012

CRM 2011 Email Router emailaddress utf-8?Q?

Display name in emails sent with CRM Email Router in CRM 2011 might be showing utf-8?Q? instead of non-ASCII chars
You might see utf-8?Q? instead of non-ASCII (å,ä,ö) chars in the from or to field when you send Emails from Microsoft CRM 2011 with the Email Router the problem is in System.Net.Mail.MailMessage.
There is a hotfix from Microsoft available to fix this issue:
http://support.microsoft.com/kb/2576045

Friday, July 6, 2012

Email Router Not Promoting BCC Emails

Microsoft Dynamics CRM Email Router is not promoting emails if the email address to be matched on is only in the bcc filed.
An event similar to the following is logged in the Application log.
#35241 - The recipients for the e-mail message with subject "your email subject" in mailbox xxxx@somemail.se did not match any known records.
One customer noticed that they did not get their emails into the CRM queue if the sender just put their email address in the bcc field.
I did not find any clear information regarding this behavior anywhere so i opened a case with Microsoft Support.
Apparently this is by design. The reason for this is that there is no information about the bcc address in the message header of the email so the email router is not able to match based on the bcc.
The same is true if you promote emails from Outlook to CRM
You can do a workaround by making an incoming email rule that redirects your incoming email where your email address is only in the bcc field to you mailbox. This way your email address appears in the to field, and the promotion of the email works.
The rule would look something like the image below.
Thank you Microsoft Support :)