Monday, October 6, 2008

Error using web part connection in list item form

Ever go this error when using a connection?
"Web Part Error: This page has exceeded its data fetch limit for connected Web Parts. Try disconnecting one or more Web Parts to correct the problem."

Well, it is known that the filter connections sometimes invoke this, and there are ways to fix it... but - I just found a "fluke" in the SharePoint connections infrastructure that is not caused by bad-coding at all.

As a matter of fact - I can reproduce it using only out of the box web parts and no custom code at all!

We wanted to have in our customers list, when a user go in to the display form of a customer, to get a list of contacts associated with this customer from the contact list.

So - we added the List View web part of Contacts list into the DispForm.aspx of the Customer list.

Than we used Custom Item Property (more information on www.kwizcom.com) that gets the current customer's title and sends it as a filter to the List View web part...

Sounds simple, only to find out that using List View web part on a display form, with a filter connection - is apparently (and unspoken) not supported!!!

It will always give an error "Web Part Error: This page has exceeded its data fetch limit for connected Web Parts. Try disconnecting one or more Web Parts to correct the problem.".

This has nothing to do with my code ( I found out couple of hours later ) since if I try it using the Query string filter web part - I get the same result every time.

Ok, after a while, I started looking for other creative solutions and found a work-around for this issue.

Converting the List View web part to a Data View web part will solve this issue and will allow you to add a filtered view of related information!!!

(Sorry for the !!!, just excited that it is not my code that caused the issue :) )

(* hint: to convert list view into data view - open the page in SharePoint Designer, right click on the list view and select the "convert to data view" option... )

Well, hope this helps save some lives, keep me posted if you have additions / questions,

Shai Petel,
VP Professional Services
KWizCom

6 comments:

tfforums said...

I am trying to do exactly this... ie add a list view to a display form and then filter it. I get the same error - however i am not using sharepoint designer... is there any other work around for this? could you post the before and after defenition xml for the list view / data view web parts?

thanks.

Anonymous said...

The minus of provided workaround (conver list view to DVWP) is that you get unghosted DispForm.
Till that point it is possisble to drop webparts and connect them in browser (in toolpaneview=2 mode). Also to get that Web Part Error. >:(

jrip said...

Just wanted to say thanks for your posting - it saved me a lot of frustration. I really appreciate you sharing the information.

Priyanka said...

Hi,
I got the same error when using a Edit form.
In my parent list item edit form,I added a child list webpart(of type list webpart).

I got the same error after using kwizcom custom item property connections.
Can you please guide me why I am getting this error in Edit form?

Thanks

~Naveen Kapoor~ said...

That Is working....Excellent.

Shai Petel said...

Hi Everyone, thanks for your comments.
Some answers:

1. You do not have to unghost the page, what i usually do is I create a new web part page in SharePoint Designer, create the data view web part there. Next I browse to that page and export the data view web part to get its XML definitions - and I use it to import it to my list view item page without unghosting it.

Sorry, I cannot provide the XML since it changes between each site/list so it would not do you any good.

For edit form it should be the same solution - good luck, if you need more help email me at shai at kwizcom.com.

thanks!