Wednesday, May 16, 2012

System.Exception: Action Microsoft.Crm.Setup.Server.GrantConfigDBDatabaseAccessAction failed. ---> System.Data.SqlClient.SqlException: Windows NT user or group '\SQLAccessGroup {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}' not found. Check the name again.

Sometimes while installing MS CRM 4.0 or 2011 we used to get the bellow error.
this happens while its doing the installation where as the environment checking is over and successful.

Error:

"System.Exception: Action Microsoft.Crm.Setup.Server.GrantConfigDBDatabaseAccessAction failed. ---> System.Data.SqlClient.SqlException: Windows NT user or group '\SQLAccessGroup {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}' not found. Check the name again. "

there are many many resolutions for different people..

1. someone who clicked the retry , it works.. but latter they may face while adding users to CRM
2. some hot fixes will resolve the issue
3. some where uninstalled and installed again works
4. some where installing with minimun credentials with the config file by precreated groups in ad works
5. some where by creating the group in manually in db and click retry also works
6. ask the AD admin , how much it takes to reflect the ad groups once its created , then wait more than that much time and click retry, it should pick it up, so its not getting the groups or user with the name specified...
7. This can be caused due to the CRM privilege groups being left in the SQL Server Security folder when CRM is uninstalled.

below are some links to the above possible solutions
http://blog.expertsoftware.co.uk/post/2010/05/04/CRM-4-Install-and-SQL-Error-15401.aspx
http://support.microsoft.com/kb/976494
http://social.microsoft.com/Forums/eu/crm/thread/65543208-6263-45d0-9801-237c0767a4da
http://kaustubhghanekar.blogspot.com/2011/02/crm-deployment-problems-with-windows.html

point 6 is bit weired but works...

hope this will help...

thanks,
yes.sudhanshu

Tuesday, May 15, 2012

Workflow Error Message in MS CRM 4.0

if any of the workflows are getting failed in ms crm 4.0, then if we will go to system jobs and see the error, it will not give the details of the message, but it will give a short and general description as "An Error has occured".
to get the details , you just go to advanced find and edit the view by adding the "Message" column, this contains the "details message..." and it will have meaningful description...

in 2011, its very clear.. you will have a details section in the record...

thanks,
yes.sudhanshu

Wednesday, May 9, 2012

Line feeds are not used when you send an e-mail message that uses an e-mail template to render data that has line feeds in Microsoft Dynamics CRM 4.0

Problem
When you send an e-mail message that uses an e-mail template to render data that has line feeds in Microsoft Dynamics CRM 4.0, the line feeds that are included in the data are not used. Instead, the data in the e-mail message is concatenated together. The data does not appear on separate lines.

For example, you create a contact type e-mail template that contains the {!Contact:Description;} code. When you try to send an e-mail message that uses the e-mail template for a contact record, the e-mail message should display a description as follows:
Line 1
Line 2
Line 3
However, the e-mail message displays the description without line feeds, as follows:
Line 1Line 2Line 3
This problem occurs if the e-mail template renders data that merges the nvarchar data type and the ntext data type.

Reason
This problem is fixed in the latest cumulative update rollup for Microsoft Dynamics CRM 4.0.
Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs.
Install this cumulative update rollup on computers that are running the Microsoft Dynamics CRM 4.0 server components

Use the following registry keys(DWORD) to enable the fix:
  • On the Microsoft Dynamics CRM Server, locate the following registry subkey:
    SOFTWARE\Microsoft\MSCRM\SDKEmailTemplateHTMLLineBreak = 1
  • On the Microsoft Dynamics CRM client for Outlook, locate the following registry key:
    SOFTWARE\Microsoft\MSCRMClient\SDKEmailTemplateHTMLLineBreak = 1

thanks,
yes.sudhanshu

A hyperlink text that is generated from an e-mail template is incomplete when you add the template to a body of an e-mail activity in Microsoft Dynamics CRM 4.0

Problem
Consider the following scenario. You create a hyperlink in an e-mail template in Microsoft Dynamics CRM 4.0. The hyperlink text contains query string variables. The query string variables include special characters, such as the slash mark (/) or the equal sign (=). Then, you add the template to the body of an e-mail activity. In this scenario, the generated hyperlink text in the body of the e-mail activity is incomplete.
Reason
This problem occurs because the e-mail template editor uses a SPAN element to create the body of an e-mail activity. If a URL contains characters that are used as part of a query string variable in a hyperlink, the URL is entered into the SPAN element. If the characters are not encoded by using hexadecimal values, the characters cannot be returned.
Solution
To resolve this problem, encode the special characters by using hexadecimal values. For example, encode the slash mark (/) by using the hexadecimal value %2f.
to get the values from URL Encoding Values

ref: http://support.microsoft.com/kb/976661

thanks,
yes.sudhanshu 

Friday, May 4, 2012

MS CRM 4.0 plug-in update of email statuscode

SetStateEmailRequest request = new SetStateEmailRequest();
request.EntityId = new Guid(context.InputParameters.Properties["EmailId"]+"");
request.EmailState = EmailState.Completed;
request.EmailStatus = 3;
ICrmService service = context.CreateCrmService(true); // this is the services getting form context as its from plugin code, other way you ca create the service...
      service.Execute( request );