Asked by:
CRM Online: KnowledgeArticle entity doesn't contain attribute with Name = IsLatestVersion

Question
-
I am unable to search Knowledge article. Following error is keep popping up on screen
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: System.Xml.XmlException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #97240BCCDetail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>System.Xml.XmlException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #97240BCC</Message>
<Timestamp>2017-01-05T15:08:51.097888Z</Timestamp>
<ExceptionSource i:nil="true" />
<InnerFault>
<ErrorCode>-2147217149</ErrorCode>
<ErrorDetails xmlns:d3p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>'KnowledgeArticle' entity doesn't contain attribute with Name = 'IsLatestVersion'.</Message>
<Timestamp>2017-01-05T15:08:51.097888Z</Timestamp>
<ExceptionSource i:nil="true" />
<InnerFault i:nil="true" />
<OriginalException i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<OriginalException i:nil="true" />
<TraceText i:nil="true" />
</OrganizationServiceFault>- Edited by M Moiez Thursday, January 5, 2017 4:01 PM
Thursday, January 5, 2017 4:00 PM
All replies
-
When do you have ths error ? What is your manipulation before this error ?Sunday, January 8, 2017 8:35 PM
-
I placed List grid on dashboard in CRM application not in "Interactive Service Hub" and also on associated view of Knowledge Article throws this error.
- Edited by M Moiez Tuesday, January 10, 2017 10:11 AM
Tuesday, January 10, 2017 10:03 AM -
I have an idea of a solution but I don't test that.
Create a plugin with step pre-operation is "RetrieveMultiple" and the primary Entity is "KnowledgeArticle".
the plugin is public void Execute(IServiceProvider serviceProvider) { // Obtain the execution context from the service provider. Microsoft.Xrm.Sdk.IPluginExecutionContext context = (Microsoft.Xrm.Sdk.IPluginExecutionContext) serviceProvider.GetService(typeof(Microsoft.Xrm.Sdk.IPluginExecutionContext)); if (context.PrimaryEntityName.Contains("<prefixforCustomEntities>")) //Replace with your prefix { tracingService.Trace("retrieveMultiple event started "); if (context.InputParameters.Contains(("Query"))) { QueryExpression query = (QueryExpression)context.InputParameters["Query"]; ; FilterExpression fexp = query.Criteria; foreach (ConditionExpression condition in fexp.Conditions) { if (condition.AttributeName == "IsLatestVersion") condition.AttributeName = "otherNameAttribut"; //Replace with your name attribut that you want } } } }
Wednesday, January 11, 2017 12:30 PM