Hi all,
I'm experiencing an issue where it is not possible to create or edit charts for a custom entity called Arbejdsgang. When trying to do so, the error message states that "To use this view, you must criteria and columns that refer to deleted or non-searchable items".
I am however unable to see exactly what view is causing this issue. I have tried reducing the default public views and the lookup view to only 2 columns that are definitely searchable, and still receive the error. Other entities allow me to create and edit charts without problems. I have noted some strange things concerning the problem.
1. When enabling additional drop logging, a different custom entity is referenced in one url
The below error message is what I found in the log
Error Details: Exception of type 'System.Web.HttpUnhandledException' was thrown.
Source File: Not available
Line Number: Not available
Request URL: https://my-crm.dk/AM/userdefined/areas.aspx?formid=1a1ca361-ccc9-4be5-8355-558031025e2c&inlineEdit=1&navItemName=Arbejdsgange&oId=%7b8C7B979C-25C1-EA11-9798-0050569B2E44%7d&oType=10027&pagemode=iframe&rof=true&security=852023&tabSet=area_am_am_indmeldelse_am_arbejdsgang_indmeldelse&theme=Outlook15White
Stack Trace Info: [InvalidOperationException: No default view was found for object type 10329 and query type 2]
at Microsoft.Crm.Caching.DefaultSavedQueryIdCacheLoader.LoadCacheData(SavedQueryIdCacheKey key, ExecutionContext context)
....Additional stack trace
I can see here, that there are two different object type codes. The one in the url pertains to a different custom entity, while the one in stack trace, pertains to the correct one (10329).
2. It is possible to export the entire custom entity as a whole, but not partially with the associated/lookup view included.
If I create and export a solution containing this custom entity, and include the entire object with metadata (non-administrated), then the export works fine. If I don't include the entire object, but manually include the associated and lookup view, I get the following errors
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: An unexpected error occurred.Detail:
<OrganizationServiceFault xmlns:i="">www.w3.org/.../XMLSchema-instance" xmlns="">schemas.microsoft.com/.../Contracts">
<ActivityId>23a61e93-bb7e-4353-967f-0f6b0bb6353e</ActivityId>
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d2p1="">schemas.datacontract.org/.../System.Collections.Generic">
<KeyValuePairOfstringanyType>
<d2p1:key>ApiExceptionSourceKey</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">Plugin/Microsoft.Crm.WebServices.ExportXmlService</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiOriginalExceptionKey</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">Microsoft.Crm.CrmException: An unexpected error occurred. ---> System.MissingMethodException: Method not found: 'Boolean Microsoft.Crm.SolutionHelper.IsCRMOrg(Microsoft.Crm.ISqlExecutionContext)'.
at Microsoft.Crm.Common.ObjectModel.UnownedAddressSecurityExtension.UnownedAddressSecurityFilterPopulator.PopulateSecurityFilterForRetrieveMultiple(Guid user, EntityMetadata entityMetadata, FilterExpression securityFilter, FilterExpression existingCriteria, ExecutionContext context, Boolean noLock, EntitySecurityPOAattributes entitySecurityPOAattributes)
at Microsoft.Crm.BusinessEntities.SecurityExtension.CreateSecurityFilter(Guid user, EntityMetadata entityMetadata, FilterExpression existingCriteria, ExecutionContext context, Boolean noLock, EntitySecurityPOAattributes entitySecurityPOAattributes, LinkEntityType linkEntityType, RetrieveMultipleSecuritySqlFormat& securitySqlFormat, Boolean forRetrieve)
.. Additional stack trace)
I am not sure what to make of these errors, and particularly googling for "DefaultSavedQueryIdCacheLoader" which is referred in the first error, seems like a black hole.
Any ideas are appreciated. We are using CRM Dynamics 365, patch 9.0.26.5.