Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Need to see how many times a Knowledge Article has been attached to Cases in ISH Dashboard

(0) ShareShare
ReportReport
Posted on by 5

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

  • Suggested answer
    Andreas Cieslik Profile Picture
    Andreas Cieslik 9,267 on at
    RE: Need to see how many times a Knowledge Article has been attached to Cases in ISH Dashboard

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans