Is something wrong with subgrid?

Risposta suggerita Is something wrong with subgrid?

  • mercoledì 6 aprile 2011 06:52
     
     

    Hi,

    I am currently using CRM 2011 and made a custom entity.

    The entity has some subgrids on the form.

    While some of the subgrids fields show data on their fields properly, others show link message

    on their fields, which is "To load [EntityName] records, click here."

    In this case, I must click the link in order to show data.

     

    Does anyone know what makes this difference and how to avoid this problem?

    (I am sorry to bother you if someone had already answered this question)

     

    Many thanks,

    Tomohiro Sakai


Tutte le risposte

  • mercoledì 6 aprile 2011 10:52
     
     Risposta suggerita

    Is there any JScript running on the form that is updating any control's layout (probably in unsupported fashion). However, there is a workaround too to solve your problem

     

    1. Know tab's name and subgrid's name from their properties

    2. Call the refresh method on the subgrid like this Xrm.Page.ui.tabs.get('TabName').controls.get('Subgrid').refresh(). This will reload the faulting subgrid and get rid of the "To load.." message.


    Manny Grewal || Australia
    • Proposto come risposta Manny Grewal mercoledì 6 aprile 2011 10:52
    •  
  • mercoledì 8 giugno 2011 06:10
     
     

    Hy

     

    I've exactly the same issue here...I've no Jscript running on the form, do I really heave to call the refresh-method? What is causing this behaviour?

     

    Kind regards,
    Peter

  • venerdì 8 luglio 2011 23:20
     
     

    Hi Sakai,

        Did you find the answer for this issue, please let me know.

     

    Thanks

    RED

  • venerdì 8 luglio 2011 23:29
     
     Risposta suggerita

    Hi Tomohiro,

    CRM only retrieves data for the first four subgrids without the user clicking on the link. This is to reduce the impact on the server at executing all of the subgrid queries at the same time. You can collapse tabs for those subgrids which you don't need right away.

    Hope this helps,
    Rich Dickinson
    Program Manager - Dynamics CRM

    • Proposto come risposta Phil Edry martedì 2 agosto 2011 18:23
    •  
  • martedì 28 febbraio 2012 09:48
     
     Risposta suggerita

    Hi Tomohiro,

    CRM only retrieves data for the first four subgrids without the user clicking on the link. This is to reduce the impact on the server at executing all of the subgrid queries at the same time. You can collapse tabs for those subgrids which you don't need right away.

    Hope this helps,
    Rich Dickinson
    Program Manager - Dynamics CRM

    Yes, Tomohiro is right.

    If you have more than 4 sub-grids in a form u have inserted, CRM will automatically load the 1st 4 sub-grids and for the rest sub-grid it will not load, rather it will give a link "To load <entityname> records, click here."

    This is because CRM takes care of the efficiency of the form to be loaded faster.

    if you want to load the grids after 4th grid, then get the object of the sub-grid and force it to load.

    Xrm.Page.ui.tabs.get('<TabName>').controls.get('<Subgrid_Name>').refresh().

    thanks,

    yes.sudhanshu


    yes.sudhanshu

    http://bproud2banindian.blogspot.com
    http://ms-crm-2011-beta.blogspot.com

    • Proposto come risposta yes.sudhanshu giovedì 15 marzo 2012 02:46
    •  
  • venerdì 8 giugno 2012 11:13
     
     

    Hi,

    Since the subgrid is inside a section, "Xrm.Page.ui.tabs.get('<TabName>').controls.get('<Subgrid_Name>').refresh()" throws null reference error.

    So it should be

    Xrm.Page.ui.tabs.get('<TabName>').sections.get('<SectionName>').controls.get('<Subgrid_Name>').refresh()