Thursday, December 22, 2011

Async Operation failed


Async Operation failed and I want to get the reason.

Run this SQL and read the message


SELECT createdon,message,PrimaryEntityType,Name,Depth FROM AsyncoperationBase

WHERE statecode = 3 AND statuscode = 31 AND Deletionstatecode = 0

ORDER BY createdon DESC



Rami Heleg

Thursday, June 2, 2011

Invalid argument for field "incomingemaildeliverymethod" in systemuser

Valid values for Picklist in CRM 3,4,2011 start from 1, 2. Values empty or 0 are not valid.

Example for picklist values:

Value                Name

0                                              Israel

1                                              USA

2                                              Holland

I have found a pick list with empty value.

Problem appears in Systemuser field incomingemaildeliverymethod.

The field incomingemaildeliverymethod values start from 2 and the first value is empty.

If I try to create new systemuser and set value for this field in pre create event values 0 or empty error message “Invalid argument “

The solution is to create a new field Picklist and set the value like that:

Microsoft.Crm.Sdk.Picklist incoming = new Microsoft.Crm.Sdk.Picklist(); = "ללא";

// Set values for this field in pre create

ContextUtils.SetProperty(context, "incomingemaildeliverymethod", incoming, typeof(PicklistProperty));

Now the set values works correctly


Rami Heleg

Monday, February 14, 2011

Clean AsyncOperationBase table

Highly recommend to clean table AsyncOperationBase for performance issue.

this script clean the table and improve Async operations.
Rami Heleg.

Friday, November 12, 2010

Failed to view Report server and get error message "The page cannot be found"

i tried to create a new organization and i faild because report server is down
when view the reportserver url get error message:

To Fix the problem needs to open Reporting Services Configuration manager and press Start.


vwalla report server works.. and now i can create a new organization

Rami Heleg

Sunday, November 7, 2010

Redeployment CRM failed after success to import users and failed to import report

Redeployment success to import a few reports but failed to import all reports.

In this case need o delete report server Encryption:

Rami Heleg

Failed to redeployment CRM organization

Failed to redeployment CRM organization and get the error message:

Import Organization (Name=LeumiCim, Id=782be048-dde4-df11-968c-00145ebd47b6) 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)

After check this error I got that the problem is missing temporary database for reporting service.

Reporting services contain 2 databases:

1. ReportServer

2. ReportServerTempDB

By mistake the database ReportServerTempDB.

To return the temporary database open "Report server Configuration"

.select "database setup" and press "New"

This option creates the temp database after this process try to run again the redeployment tools.


Rami Heleg

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.


Rami Heleg.