Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

CRM 2011 Multiple Subgrids

Posted on 2011-10-04
11
Medium Priority
?
905 Views
Last Modified: 2012-05-12
We have noticed when there are four or more subgrids on a single form in Dynamics CRM 2011, not all of the subgrids will load the data, forcing users to click a link to access the data within the subgrids.

How can data be automatically loaded into all of the subgrids when a user loads a record?
0
Comment
Question by:rdracer58
  • 5
  • 4
10 Comments
 
LVL 13

Assisted Solution

by:Lucas
Lucas earned 400 total points
ID: 36919860
Which form / entity? Are there any silverlight plugins as the sub grids?

0
 

Author Comment

by:rdracer58
ID: 36919874
We have the same situation (four or more subgrids) on multiple custom entities and their corresponding forms. And no, we are no using any silverlight plugins as the sub grids.
0
 
LVL 27

Accepted Solution

by:
Chinmay Patel earned 1600 total points
ID: 36924165
Hi Lukas and rdracer58,

I have a workaround that might come really handy to you guys, I was facing the same situation as you guys, hope this one will help you.
http://www.crmxpress.net/blog/post/2011/10/06/CRM-2011-Multiple-Sub-Grid-OnLoad-Fix.aspx

Regards,
Chinmay.

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:rdracer58
ID: 36924187
Hi Cinmay,

Do you perchance have another link? That one seems to be broken.

Thanks!

rdracer58
0
 
LVL 27

Assisted Solution

by:Chinmay Patel
Chinmay Patel earned 1600 total points
ID: 36924558
Hi rdracer58,

This is strange, my blogpost was deleted :[.

Anyways by chance I kept that window open so just re-created my original post by copy-paste. Try the link and it should work.

I have attached the code for your reference here.
function CrmXpress.Scripts.UI.SubGridLoadFix() { 
  
    $(document).ready(function () { 
  
        var links = $("a.ms-crm-List-LoadOnDemand") 
        for (i = 0; i <= links.length; i++) { 
            try { 
                links[i].click(); 
            } 
            catch (e) { 
                // Handle for other errors, or safely ignore 
            } 
        } 
    } 
); 
}

Open in new window


Regards,
Chinmay.
0
 

Author Comment

by:rdracer58
ID: 36924775
Excellent, thanks! I noticed on your blog entry that the JQuery minified library must be added. As I am new to scripting in CRM, where/how does this get added?
0
 
LVL 27

Assisted Solution

by:Chinmay Patel
Chinmay Patel earned 1600 total points
ID: 36924926
You will have to add it as a Web Resource on the form where you want to execute the script.

Here is a link that might help you.
http://community.dynamics.com/product/crm/crmtechnical/b/crminogic/archive/2011/03/08/use-of-web-resources-in-crm-2011.aspx

Add minified jQuery as one web resource and my script as a seperate resource. After that you can call : CrmXpress.Scripts.UI.SubGridLoadFix function on the OnLoad event of your form.

Regards,
Chinmay.
0
 

Author Comment

by:rdracer58
ID: 36925039
Great, thanks! To help clarify and ensure I understand correctly, each time I want to add scripting functionality to a form in CRM, I have to (1) add any applicable libraries as a web resource, (2) add the script itself as a web resource, and then (3) reference the appropriate function in the event (OnLoad, OnSave, etc.)?

Also, are there any good resources online that explain CRM scripting/coding/development in general? Any good books and other materials you would recommend?
0
 
LVL 27

Assisted Solution

by:Chinmay Patel
Chinmay Patel earned 1600 total points
ID: 36925148
No. Only in this case we have to do so 'cause my script is using features from jQuery. Otherwise only script that you need should be added. As such jQuery is something you will use a LOT if you want to simplify CRM Scripting.

Also you can skip adding a function if you have written your script to execute without a function. I just want to keep things organized that's why I have kept a function. There are no such fixed rules when it comes to development, just best practices.

I would strongly recommend CRM SDK : http://www.experts-exchange.com/Microsoft/Applications/Microsoft_Dynamics/Q_27377023.html to start with. Once you have basic understanding you can move towards advanced books.

Regards,
Chinmay.
0
 
LVL 27

Expert Comment

by:Chinmay Patel
ID: 36925785
Hi rdracer58,

Can you tell me why my answer was not accepted?
And in my previous post I sent you a different link by mistake. Correct link for SDK is : http://www.microsoft.com/download/en/details.aspx?id=24004

Regards,
Chinmay.
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In today's business world, data is more important than ever for informing marketing campaigns. Accessing and using data, however, may not come naturally to some creative marketing professionals. Here are four tips for adapting to wield data for insi…
What we learned in Webroot's webinar on multi-vector protection.
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question