web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Display related Posts, Activities and Notes in a single View / Grid

(1) ShareShare
ReportReport
Posted on by

Hello, 

I've previously posted a question on the forum on how to view an Account's related Posts, Activities and Notes from the account record. I received a reply that I can do it by creating a report. However, my customer doesn't use SSRS within his CRM and I would need to do this using by customizing a View or creating an HTML web resource. 

This is what I want my grid to look like:

88730.Capture.JPG

Here are the problems I'm facing:

1- I'm not sure how to create a fetchxml for that table. It seems to me like a "Union" fetchxml which i'm not sure how to do. 

2- I tried updating the Grid's fetchxml on form load using a simple fetchxml just to test it, but it didn't work. The SetParameter() method worked neither with "getElementById" nor with "GetControl". I'm using CRM online with update 1. 

3- I thought of using an html web resource but i'm not really sure where to start. I've read that I can use SparkXML to create custom grids but i'm not sure if that would work for me. 

I would appreciate any insight on this matter. 

*This post is locked for comments

I have the same question (0)
  • Aileen Gusni Profile Picture
    44,524 on at

    Hi Sb User

    You cany create 1 subgrid multiple entities.

    You can create a report for the soucr from 3 entities.

    Or create a custom web resourcr that you need to build the custom subgrid.

    Thanks.

  • Verified answer
    Aileen Gusni Profile Picture
    44,524 on at

    Hi SB

    Sorry didnt notice the user doesnt want ssrs.

    Using the fetch xml and grid cant allow you to have 1 grid multiple entities.

    I think you reallyneed to create custom subgrid from zero then using odata query to query then you parse it to the data to be displayed in the grid.

    THanks.

  • Verified answer
    Community Member Profile Picture
    on at

    Hi,

    Only view which is available out of the box is the associated view. But you cannot add it on the form, it is available from the ribbon menu only. If you want to create one grid to show all activities, then you must go with the html webresource. Here's what you can do, because this is a simple grid for showing purpose only then you don't need to use any 3rd party grids. You can retrieve email, notes etc one by one, then create your own html table using the data.

  • Community Member Profile Picture
    on at

    Aileen and Vikas, thank you very much for your help. Can you suggest any article that provides a tutorial for creating such HTML webresource with a grid ? I can't find something relevant so far.

  • Community Member Profile Picture
    on at

    This is something that I have done recently. This code generates the html table with the data retrieved from CRM in a webresource. Hope this will help you:

    if (records.length > 0) {

                       var htmlString = "<table id='tblList' cellpadding='0' cellspacing='0'><tr><th>Name</th><th>Email Address</th><th>Total Amount Paid</th></tr>";

                       for (var i = 0; i < records.length; i++) {

                               htmlString += "<tr><td>" + records[i].attributes["attribute"].name + "</td><td>" + records[i].attributes["attribute"] + "</td><td>" + records[i].attributes["attribute"].value + "</td></tr>";

                               emailid = "";

                       }

    }

    htmlString += "</table>";

                       document.getElementById("divConst").innerHTML = htmlString;

  • Community Member Profile Picture
    on at

    Greatly appreciated !

  • Aileen Gusni Profile Picture
    44,524 on at

    Hi SBUser,

    See whether this article helps you.

    mscrmtools.blogspot.sg/.../full-featured-crm-grid-in-htmljs.html

    Thanks

  • Community Member Profile Picture
    on at

    Thank you Aileen, I checked this post but the user hasn't provided one of the js files used so i thought this won't give me a detailed tutorial on how to do it. However, it still provides some insights on creating an html grid.

  • Aileen Gusni Profile Picture
    44,524 on at

    Hi SbUser

    Yes.

    Either you use html web resource or you use iframe showing your asp.net.

    Of course building using asp.net is easier but you need to maintain different port to host your aspx custom page website.

    ThAnks

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans