Showing posts with label Problems and Solutions. Show all posts
Showing posts with label Problems and Solutions. Show all posts

Thursday, June 2, 2011

Invalid argument for field "incomingemaildeliverymethod" in systemuser

Hi,
 
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();

incoming.name = "ללא";

// Set values for this field in pre create

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

Now the set values works correctly

Thanks,

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:





















thanks,
Rami Heleg

Failed to redeployment CRM organization

Failed to redeployment CRM organization and get the error message:


13:02:20
Error
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.



Thanks,

Rami Heleg

Sunday, October 24, 2010

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

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

Monday, August 9, 2010

Working with GAC

I CRM 4.0 usual is to work with GAC (Global assembly cache)
Replace file, delete file, copy file.
If failed to delete or copy file from GAC
Make the next instructions:
How to view windows/assembly folder
1. Open Regedit, browse to HKLM\Software\Microsoft\Fusion.
2. Add a REG_DWORD value named 'DisableCacheViewer'; set it to 1
3. open an Explorer window and type in C:\WINDOWS\assembly\GAC_MSIL\

Open GAC ( c:\windows\assembly\msil and copy the relevant file and remove
After finish change 'DisableCacheViewer' to 0
Thanks
Rami Heleg.

Saturday, May 8, 2010

Error message when open Deployment Manager

Hi,
i try to open Deployment Manager many time and get sometimes error message.
after press the message the Deployment Manager still work.

to solve this error need to add key to register..

reasons for the error:Active Directory contains many domain controllers.
You have insufficient permissions to query all domain controllers.

solution:

Go to the following registry :
HKLM\Software\Microsoft\MSCRM
Add a new String value that is named PreferredDc.
Specify the domain controller that you want. Typically, this is the closest domain controller.
Restart the CRM server.

thanks,
Rami Heleg

Friday, March 26, 2010

Failed to publish workflow for Email entity

I got error message after publish Workflow for email entity steps .



"An error occurred when the workflow was being created. Try to save workflow again"
after i try to publish workflow with email steps.

the reason can be installed rollup 2

the solution can be adding next rows to CRM 4.0 web config


<authorizedType Assembly="mscorlib, Version=2.0.0.0, Culture=neutral,

PublicKeyToken=b77a5c561934e089" Namespace="System" TypeName="Void"

Authorized="True"/>

<authorizedType Assembly="mscorlib, Version=2.0.0.0, Culture=neutral,

PublicKeyToken=b77a5c561934e089" Namespace="System.Reflection"

TypeName="AssemblyFileVersionAttribute" Authorized="True"/>

<authorizedType Assembly="mscorlib, Version=2.0.0.0, Culture=neutral,

PublicKeyToken=b77a5c561934e089" Namespace="System.Reflection"

TypeName="AssemblyVersionAttribute" Authorized="True"/>

<authorizedType Assembly="mscorlib, Version=2.0.0.0, Culture=neutral,

PublicKeyToken=b77a5c561934e089" Namespace="System.Globalization"

TypeName="CultureInfo" Authorized="True"/>


thanks
Rami Heleg.

Monday, March 8, 2010

Using CRM 3/4 with Internet Explorer 6

Hi,
adding JS + AJAX CRM 3,4 using Internet explorer 6 may cause edit.aspx to freeze when loading.

Reason:
When page is loading explorer 6 behavior is a different from explorer 7,8.

If you add some code ( JS + ajax) when page is loading .. before client finish with all methods the lookup fields on the screen start to throw error (on focus event). but in explorer 7 only after all code is finished then lookup start with focus.

You can change the htc, JS files in many places but this is not a good solution.

solution:

upgrading to Internet explorer 7,8 solve this issue.

thanks Rami,

Saturday, March 6, 2010

Export Dynamics or Pivotable freeze CRM.

Hi,
CRM 3/4 can be freeze if using Export Dynamic or Pivotable to excel.

in this case the selected records locked on the db and until close the excel file.

the options to export dynamic or pivotable is good only for POC or Demo but not in live



solution:
1. change hard coded the file from prevent the options to export.
2. Create your own excel files with sql queries , create links and call to thus files from client side

for CRM 3.0 change file: print_dlg.aspx
for crm 4.0 change file: export_dlg.aspx


thanks,
Rami Heleg,

Monday, February 8, 2010

CRM performance is very slow

I work with CRM ¾ and all the system works very slowly

Loading pages is very slow, and all the system looks busy.

One of the options is Antivirus.

When you work with CRM and open some pages for instance Edit.aspx not only the edit.aspx is downloaded from server many JavaScript + CSS + other linked pages is downloaded too

If antivirus is working check if Antivirus is scanning all the scripts and pages when you request page from CRM.

if yes... change the Antivirus to prevent of scanning all CRM pages and the performance back to be perfect

I got this problem with Antivirus MCAfee.


workaround
http://support.microsoft.com/kb/924341

https://kc.mcafee.com/corporate/index?page=content&id=KB65382&actp=search&viewlocale=en_US&searchid=1278011200919

Thanks,
Rami Heleg.

Friday, January 29, 2010

Fetch or Retrieve?

Fetch or Retrieve?

The million dollars question what is better using fetch or RetrieveMultiple...

RetrieveMultiple faster than the Fetch method Retrieve doesn’t have to parse the query.

My tip:

Work direcly with CRM DB for Queries and update.

Important:
Use “nolock” for select command.
in this case database doesn’t lock the table
Use “rowlock” to update table lock only the specific record.

Example for select command:

Select firstname, lastname from contact with (nolock)

Example for update command:

Update incidentextensionbase WITH(rowlock) set new_firstname = ‘aaa’ where incidentid = ‘{fdkjdf98438e9w8euew987}

Enjoy,
Rami Heleg

Thursday, December 3, 2009

Crm 4.0 Microsoft CRM Asynchronous failed and require restart

Hi
Error Message:

Exception type: CrmException
Exception message: The key specified to compute a hash value is expired, only active keys are valid. Expired Key : CrmKey(Id:c1bef2e2-efc5-de11-b538-005056a75caa, ScaleGroupId:00000000-0000-0000-0000-000000000000,
KeyType:CrmWRPCTokenKey, Expired:True, ValidOn:10/31/2009 07:34:57, ExpiresOn:12/03/2009 07:34:57, CreatedOn:10/31/2009 07:34:57, CreatedBy:NT AUTHORITY\NETWORK SERVICE.

This problem occurs because Microsoft Dynamics CRM 4.0 uses the name of the SQL server that is in the organization table of the mscrm_config database when Microsoft Dynamics CRM 4.0 tries to connect to the SQL server. If the name is lowercase, the Async service cannot correctly process the jobs in the ScaleGroupOrganizationMaintenanceJobs table. The SqlServerName name must be the same as the value that is returned by the @@servername global variable.

Because of that the solution is to install Rollup 7.0

Microsoft Articles:

<a href="http://support.microsoft.com/kb/949844"></a>
<a href="http://support.microsoft.com/kb/949256/"></a>

Thanks and enjoy,
Rami Heleg

Sunday, November 29, 2009

Allow to CRM 4.0 to pass( add) parameters to query string.

Hi,
CRM 4.0 disabled option to add parameters in query string.

to change this option need to change register.
goto Start - Run write -> regedit ( register)

Edit the registry in:
HKEY_Local_Machine\Software\Microsoft\MSCRM
Add a new DWORD
"DisableParameterFilter"
set value to 1.‬

this changes will help to add parameters in query string.

Enjoy,
Rami Heleg

Tuesday, November 3, 2009

Allow to Work with all CRM DB tables

Hi

I try to ask tables in CRM which I am not Authorized to ask.. what can I do?

You need to wrap the Query, Insert etc with this example


WindowsImpersonationContext impersonation = WindowsIdentity.Impersonate(IntPtr.Zero);
try {
// my code
} finally {
impersonation.Undo();
}

This solution will help you to work with all Database, CRM tables.

Enjoy,
Rami Heleg

Sunday, October 4, 2009

How to prevent SQL Timeout expired in Microsoft Dynamics CRM:

One of the problems when working with CRM and SQL is when making a complex Select/Query CRM get SQL time out.

The solution is define timeout in register.

1. Open regedit ( start - > write ( regedit) ) and press ok

2. Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM

3. Add DWORD name OLEDBTimeout with value 86400 ( 24 hours) select decimal

4. Add DWORD name ExtendedTimeout with value 1000000. The maximum value can be 2,147,483,647 and the default value is 30 seconds

This changes in register should fix the SQL timeout.

Thanks,
Rami Heleg.

Friday, September 25, 2009

Problem:
Running server-side code developments under CRM Server folder get Error 401 – Unauthorized.

This is a problem I've seen several times.
if you try to run the same code not under CRM folder and it works fine here is the Solution:

To solve this error need to make change in Microsoft CRM 4.0 web config:

What to add:










Thanks,
Rami Heleg

CRM Screens freeze- Stuck

Try to open CRM Form usually edit.aspx page with a few iframes.

in some cases screen Stuck.

The reason for that is internet explorer Settings.
The default connection for internet explorer is two. It means the main form request data + one of the iframes then other iframes wait.. this problem Causes CRM to be freeze.

Solution:
Change the default values:
Open register page:
1. Go to start - > run and Type regedit:
2. Define MaxConnectionsPer1_0Server and MaxConnectionsPerServer like the following example


[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings] MaxConnectionsPer1_0Server = dword: 0000000a
MaxConnectionsPerServer = dword: 0000000a





Thanks,

Rami Heleg