The entity with a name = ‘new_xxx_new_yyy’ was not found in the MetadataCache.

When you set custom view for filtering many to many (N:N) relationship, if u get an error like this. You have to change link entity name. You can check intersectEntityName from metadata browser.

The entity with a name = ‘new_xxx_new_yyy’ was not found in the MetadataCache.

intersect-entity-name-metadata

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad264e35]]: The entity with a name = ‘new_xxx_new_yyy’ was not found in the MetadataCache.Detail:
<OrganizationServiceFault xmlns:i=”http://www.w3.org/2001/XMLSchema-instance” xmlns=”http://schemas.microsoft.com/xrm/2011/Contracts”>
<ErrorCode>-2147217150</ErrorCode>
<ErrorDetails xmlns:d2p1=”http://schemas.datacontract.org/2004/07/System.Collections.Generic” />
<Message>The entity with a name = ‘new_xxx_new_yyy’ was not found in the MetadataCache.</Message>
<Timestamp>2016-10-25T14:45:38.4066037Z</Timestamp>
<InnerFault i:nil=”true” />
<TraceText i:nil=”true” />
</OrganizationServiceFault>

Read More

CRM Errors : Login failed for user

If you get errors like this, you have to add user to sql who log on as service account  or

  • You install Microsoft Dynamics CRM in a multiple-server environment. Then, you install Microsoft Dynamics CRM directly on a server that is running Microsoft SQL Server. However, some SQL Server permissions are not set.
  •   The Microsoft Dynamics CRM server is not added to the SQLAccessGroup group in the Active Directory directory service.
  • Application Pool identity was set to the Built-in Account in the Advanced Settings of App pool, instead change it to one of the user account which has access to Database.

 

  • Error in LoadDeploymentSettings [Cannot open database “MSCRM_CONFIG” requested by the login. The login failed.
  • Error in LoadSiteWideSettings [Cannot open database “MSCRM_CONFIG” requested by the login. The login failed.
  • The type initializer for ‘Microsoft.Crm.Monitoring.MonitoringSettings’ threw an exception. System.Data.SqlClient.SqlException: Cannot open database “MSCRM_CONFIG” requested by the login. The login failed.

 

Monitoring runtime failed: Machine: CRMKitchen:
Exception: SmokeTests failed with exception :
System.TypeInitializationException:
The type initializer for ‘Microsoft.Crm.Monitoring.MonitoringSettings’ threw an exception. —> System.Data.SqlClient.SqlException: Cannot open database “MSCRM_CONFIG” requested by the login. The login failed.
Login failed for user ‘CRMKitchen\CRMService’.

 

CrmTrace encountered an error. Additional Info:Error in LoadSiteWideSettings [Cannot open database “MSCRM_CONFIG” requested by the login. The login failed.
Login failed for user ‘CRMKitchen\CRMService’.], Stack Trace : at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Environment.get_StackTrace()
at Microsoft.Crm.CrmTraceSettings.Load(String traceDirectory)
at Microsoft.Crm.CrmTrace.get_RefreshTrace()
at Microsoft.Crm.CrmTrace.Write(Guid orgId, TraceCategory traceCategory, TraceLevel traceLevel, Int32 skipFrames, String format, Object[] args)
at Microsoft.Crm.CrmTrace.TraceFormat(Guid orgId, TraceCategory traceCategory, TraceLevel traceLevel, String format, Object[] args)
at Microsoft.Crm.CrmTrace.Initialize()
at Microsoft.Crm.Asynchronous.AsyncService.StartServiceComponents(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch(), Inner Exception: , Data: System.Collections.ListDictionaryInternal (Reporting Process:CrmAsyncService, AppDomain:C:\PROGRA~1\MICROS~4\Server\bin\)

 

More info  :

https://support.microsoft.com/en-us/kb/946286

http://mscrmtechie.blogspot.com.tr/2015/07/login-failed-for-user-domain-servername_23.html

Read More

CRM Reporting Extensions Setup Error : The SQL Server Reporting Services account is a local user and is not supported

The SQL Server Reporting Services account is a local user and is not supported

reporting-setup-error

If you get an error when trying to install Microsoft Dynamics CRM Reporting Extensions (SetupSrsDataConnector). You have to change service account on Reporting Services Configuration Manager.

  1. Open the Reporting Services Configuration Manager
  2. Change the Service Account to Network Service.
  3. While changing account it will ask you “Backup Encryption Key”
  4. Type your pass and locate file.
  5. Then you can continue to setup Reporting Extensions.

 

More info :

https://msdn.microsoft.com/en-us/library/ms160340.aspx

https://mscrmonline.wordpress.com/2012/07/31/microsoft-crm-2011-and-sql-server-2012-support/

SQL Server Reporting Services Account is a local user and is not supported – Error installing SrsDataConnector

Read More

The issuer of the security token was not recognized by the IssuerNameRegistry. To accept security tokens from this issuer, configure the IssuerNameRegistry to return a valid name for this issuer

If you get an error like this, you have to update federation metedata url and iisreset then restart adfs service.  Normally CRM throws a generic error and I found this message from trace.

The issuer of the security token was not recognized by the IssuerNameRegistry. To accept security tokens from this issuer, configure the IssuerNameRegistry to return a valid name for this issuer

unexpected-error-crm

  1. Open Deployment Manager on CRM Server
  2. Configure Claims Based Authentication from wizard
  3. Click start menu, select run and type iisreset to complete.
  4. Then go to Services on ADFS Server and restart ADFS Service.

 

Reference : https://support.microsoft.com/en-us/kb/2686840

http://www.dynamicscrmpros.com/microsoft-dynamics-crm-error-the-issuer-of-the-security-token-was-not-recognized-by-the-issuernameregistry-solved/

Read More

Querying Order By Link Entity with Fetch XML

If you want to sort the results based from linked data, we can add order by link entity’s attribute like this :

 

 

Read More

Invalid privilege depth – Cannot Update Security Role Privilege

Invalid privilege depth

crm role error invalid depth

If you get this error while updating security role, you can try to fix the following steps :

  1.  Navigate to Settings > Security > Security Roles.
  2.  Open the Security role and navigate to Core Records.
  3.  Assign the Organization level privileges to Data Performance Dashboard entity.
  4.  Save and close the record.

Reference : https://community.dynamics.com/crm/f/117/t/207450

Read More

Unable to start CRM Email Router Service

When you try to start the MS CRM E-mail Router Service in Microsoft Dynamics CRM Backend Server, you get an error like

The Microsoft CRM Email Router service on Local Computer started and then stopped. Some services stop automatically if they are not in use by other services or programs.

 

This problem occurs because the Microsoft.Crm.Tools.EmailAgent.SystemState.xml file is corrupted.

  1. Delete the Microsoft.Crm.Tools.EmailAgent.SystemState.xml file.

    C:\Program Files\Microsoft CRM Email\Service\Microsoft.Crm.Tools.EmailAgent.SystemState.xml

  2. Restart the Microsoft Dynamics CRM E-mail Router Service.

 

More info : https://support.microsoft.com/en-us/kb/954522

Read More

Dynamics CRM Error : Importing Solution – Fields that are not valid were specified for the entity

Fields that are not valid were specified for the entity

When you try to import a solution to another environment if you get an error like this. That error is about field of incompatibility so you must find that incompatibility and delete that field from it there where you want to import

For example :

  • You have a nvarchar field in development environment and have an integer field as same fieldname in test environment.
  • new_age (string)  VS new_age (integer).

 

Read More

CRM Tips : Javascript Stop Form Saving

If you want to control your process on save event, you can use preventDefault method.

Dont forget to click “Pass execution context as first parameter” on Form Properties.

crm on save javascript

preventDefault : Cancels the save operation, but all remaining handlers for the event will still be executed.

 

Save event arguments (client-side reference)

https://msdn.microsoft.com/en-us/library/gg509060.aspx

Read More