Sunday, October 24, 2010

View CRM log files for instance redeployment file:

View CRM log files for instance redeployment file:


Go to start run write %APPDATA%

Select folder Microsoft\MSCRM\Logs

Many files appear, in this case select the latest modified file.



Thanks,

Rami Heleg.

Redeployment success but get in error message in log file because update version id

Hi,
Redeployment success but get in error message in log file because update version id :

14:54:56
Info
Applying database updates to the organization...

14:55:12
Info
Updating BuildVersion.Revision for all Organization Databases

14:55:12
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.

14:55:12
Info
Organization (XXX) imported.

16:35:51
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.

16:35:51
Info
Deployment Manager Exit

The solution for that: install rollup 13 ( never mind if exist ) . Redeployment failed to update version in DB.

Thanks,
Rami Heleg

Tuesday, October 12, 2010

Time out When Email router run SQL queries

Hi,
CRM/Email router return time out when retrieve email queries.
The reason is to query to retrieve Activities/Email.


To solve the issue must add parameter to register.

1. Under the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM\registry subkey on the Microsoft Dynamics CRM server, add the following REG_DWORD registry entry: SmartMatchingForceOrder

2. Set the value of the registry entry that you just added to 1

BTW Rollup 13 must be installed

Thanks,
Rami Heleg

Monday, October 11, 2010

Use Thread to improve performance.

Option to improve performance for callouts or just server side is to use thread

Here Is an example of using thread:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace thread {

class Program {
static void Main(string[] args) {
  System.Threading.ThreadPool.QueueUserWorkItem(f => {xxx();});
  }

  static void xxx(){
  int a = 8;
  }
 }
}



Enjoy,

Rami Heleg

Sunday, October 10, 2010

How to create a new organization/ import organization and prevent from insert report service URL…?

Everyone know to create/import organization must insert report URL.


We can prevent insert the report URL and of course success to create organization …

How to do that….?


Add the IgnoreChecks registry key to the computer that is running Microsoft Dynamics CRM 4.
 click Run, type regedit, and then click OK.
In the registry, locate the following subkey:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM
Right-click MSCRM, point to New, click DWORD Value, and then type IgnoreChecks.  + set Value 1.
Sceen shots:








Thanks,
Rami Heleg

Saturday, October 9, 2010

Failed to open CRM. get error message License Expired.

Hi,
  Open CRM and get error message in CRM+ in event viewer “license expired”.
  Error message appears in two modes.

  1. The first case when the license expired.
  2. When service MS Async Service is down.

Go to services windows, select Async service and run again.
Thanks,
Rami heleg

Find CRM entity name by ObjectID

Everybody knows this strange error message from CRM trace logs: Error Message: SecLib::AccessCheckEx failed. Returned hr = -2147187962, ObjectID: 48355f9a-96c5-df11-90dc-00145ebd47b6, OwningUser: 6d04898c-db79-df11-83b4-00145ebd47b6 and CallingUser: 9cfc1a56-da79-df11-83b4-00145ebd47b6.
CRM failed to perform some action on an entity with ObjectID = 48355f9a-96c5-df11-90dc-00145ebd47b6
The error does not contain the problematic entity name I prefer to know.
So I wrote the SQL script that helps me to find an entity name by ObjectID

DECLARE @objectId uniqueidentifier

SET @objectId = '41DC59A0-96C5-DF11-90DC-00145EBD47B6' – Set your ObjectID here
DECLARE @entityName nvarchar(255), @baseEntityName nvarchar(255), @primaryKeyColumnName nvarchar(255), @sql nvarchar(max), @isActivity bit
DECLARE cur CURSOR FOR SELECT Name, BaseTableName, IsActivity from Entity with (nolock) where IsValidForAdvancedFind = 1
OPEN cur
FETCH NEXT FROM cur INTO @entityName, @baseEntityName, @isActivity
WHILE @@FETCH_STATUS = 0
BEGIN
if(@isActivity = 1 OR @entityName = 'ActivityPointer')
SET @primaryKeyColumnName = 'activityid'
else
SET @primaryKeyColumnName = @entityName + 'id'
SET @sql = 'IF EXISTS(SELECT ' + @primaryKeyColumnName + ' FROM ' + @baseEntityName + ' WHERE ' + @primaryKeyColumnName + '=''' + CONVERT(nvarchar(36), @objectId) + ''') SELECT ''' + @entityName + ''''
exec(@sql)
IF @@ROWCOUNT > 0 BREAK;
FETCH NEXT FROM cur INTO @entityName, @baseEntityName, @isActivity
END
DEALLOCATE cur

Thanks,
Max s