Hello Everyone,
We need to see how many times a Knowledge Article has been attached to Cases in ISH Dashboard.
Best Regards,
Ankush Grover
*This post is locked for comments
Hello Everyone,
We need to see how many times a Knowledge Article has been attached to Cases in ISH Dashboard.
Best Regards,
Ankush Grover
*This post is locked for comments
You could create a new field that holds that count.
Then write a plugin that attaches to the associate Event (fires when article gets attached)
mscrmtechie.blogspot.de/.../associatedisassociate-plugin-messages.html
or demystifyingcrm.wordpress.com/.../trigger-plugin-for-nn-relationships-in-dynamics-crm
and check for the n:n relationship KnowledgeBaseRecord_Incident from the entity knowledgebaserecord.
You can retrieve records from that relationship similar to this:
//Create the related entities query
RelationshipQueryCollection retrieveRelatedEntities = new RelationshipQueryCollection();
retrieveRelatedEntities[primaryContactRelationship] = new QueryExpression(Account.EntityLogicalName)
{
ColumnSet = new ColumnSet("name"),
Criteria = new FilterExpression()
};
//Create the request
RetrieveResponse response = (RetrieveResponse)service.Execute(new RetrieveRequest()
{
ColumnSet = new ColumnSet("firstname"),
RelatedEntitiesQuery = retrieveRelatedEntities,
Target = new EntityReference(primaryContact.LogicalName, primaryContact.Id)
});
tracingService.Trace("Retrieve the record with its related entities");
Contact retrievedContact = (Contact)response.Entity;
Account retrievedAccount = (Account)retrievedContact.RelatedEntities[primaryContactRelationship][0];
or build a fetchxml query with count aggregate to get the count:
community.dynamics.com/.../201259
then set count on the entity
André Arnaud de Cal... 291,711 Super User 2024 Season 2
Martin Dráb 230,458 Most Valuable Professional
nmaenpaa 101,156