locked
5 entities that I would like to display in one grid... RRS feed

  • Question

  • I have 5 entities that I would like to display in one grid. I would like a single or double-click on a grid row to open a different form for each entity. The 5 entities have a set of fields in common and then a larger number of fields that are unique to each entity.

    I am attempting to avoid a single, combined entity that holds a superset of all the fields. The reason I am avoiding this is to improve database performance (the single entity could have 1000+ fields, eventually) and to avoid writing hide/show logic. 

    I am also trying to avoid having a separate grid for each of the 5 entities so I don't have to add a new grid every time I add a new entity (which will happen a couple of times a year).

    I working in CRM 2011.

    Any ideas on how to accomplish this?

    Many thanks!


    • Edited by Zopi Friday, March 7, 2014 9:21 PM clarification of title
    Friday, March 7, 2014 9:20 PM

Answers

  • May be you should create HTML web resource in combination with JavaScript to fetch data using FetchXml (it can get data from multiple entities) and you can show this grid either in an iFrame or as a pop-out on click of a ribbon button.
    • Marked as answer by Zopi Monday, March 10, 2014 4:10 PM
    Friday, March 7, 2014 9:29 PM
  • It's not possible to manipulate such a query in FetchXml.

    What Ahmad Pirani suggested might be querying all data and manipulate in the client script and render the HTML table on the web resource either in an iFrame or as a pop-out on click of a ribbon button.

    • Marked as answer by Zopi Monday, March 10, 2014 4:10 PM
    Monday, March 10, 2014 6:41 AM
  • Hi Zopi,

    The best approach would be to execute 5 different REST calls using JavaScript for the different entities. Once you get the records, display them in a custom HTML web resource and have it popup on ribbon button click or even better, embed that web resource inside an iFrame in the form itself.


    Admin QuikView Solution for CRM 2013

    • Marked as answer by Zopi Monday, March 10, 2014 4:10 PM
    Monday, March 10, 2014 10:55 AM

All replies

  • May be you should create HTML web resource in combination with JavaScript to fetch data using FetchXml (it can get data from multiple entities) and you can show this grid either in an iFrame or as a pop-out on click of a ribbon button.
    • Marked as answer by Zopi Monday, March 10, 2014 4:10 PM
    Friday, March 7, 2014 9:29 PM
  • Ahmad - thank you for your quick reply! I would like to have a small set of the "common fields" show in the grid so each grid row does not have a lot of empty cells. In T-SQL (my "native language") I would write a select with several UNIONs but I had thought that a UNION was not possible in FetchXml. Is there a way to do a UNION in FetchXml? Or am I misunderstanding what you are suggesting?

    Thanks!

    Friday, March 7, 2014 9:39 PM
  • It's not possible to manipulate such a query in FetchXml.

    What Ahmad Pirani suggested might be querying all data and manipulate in the client script and render the HTML table on the web resource either in an iFrame or as a pop-out on click of a ribbon button.

    • Marked as answer by Zopi Monday, March 10, 2014 4:10 PM
    Monday, March 10, 2014 6:41 AM
  • hi

     i  have one query is there any relation between these entites?

    Monday, March 10, 2014 10:35 AM
  • Hi Zopi,

    The best approach would be to execute 5 different REST calls using JavaScript for the different entities. Once you get the records, display them in a custom HTML web resource and have it popup on ribbon button click or even better, embed that web resource inside an iFrame in the form itself.


    Admin QuikView Solution for CRM 2013

    • Marked as answer by Zopi Monday, March 10, 2014 4:10 PM
    Monday, March 10, 2014 10:55 AM
  • Hi, sailusha! All 5 entities will share a customerid (each of the 5 entity tables will have a non-nullable foreign key to the customer table).
    Monday, March 10, 2014 4:09 PM