connecting web parts in sharepoint - sharepoint

I am trying to connect to simple webparts in my sharepoint team site, i need one of the webparts to filter its information based on what it recieves from another webpart
I am using the query string filter webpart and the a list view webpart but no matter how i connect them always i am getting this 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."
What should I do and what am I doing wrong
update:
i can connect to web parts on some other pgae, but getting this error on the DispForm.aspx page of a certain item , is webpart connections not allowed there ??!!

There is an issue with creating QueryString filter webparts in sharepoint, when you're not using the Web UI (I'm making an assumption that you aren't).
This fella here has a post about it and how he hacked around the issue.
http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/0328f1b2-20cd-427f-887a-e2925bd695e3/
Another option is not using the QueryString filter web part at all, and just passing querystrings to a regular web part.
http://mo.notono.us/2008/04/moss-filter-views-through-url-query.html

Me too,you look this url
http://blogs.msdn.com/sharepointdesigner/archive/2008/03/26/sharepoint-conference-building-a-sharepoint-designer-mashup-part-1.aspx

I have fixed this issue.
Problem
In the sharepoint list, filtered column name in query strng fitlter has been deleted and added new column with same name.
Solution: Remove filter and Set current view again in webpart properties. It works fine.
With Regards,
Marees

The page 'DispForm.aspx' usually is a form of a SharePoint list and different rules apply to list-form pages than on pages that do not belong to a Sharepoint list (and the differences are hardly documented). I solved the problem by workarounds; you could use not a ListViewWebPart, but a DataViewWebPart (Using Query String and Data view WebPart), or you could avoid the QueryStringFilterWebPart by using URL parameters that the ListViewWebPart understands (ListViewWebPart Filter Param).

Related

Using Microsoft Graph API to Query Certain Sharepoint URIs with .aspx Extensions

I have a question about sharepoint combined with the graph API. I'm trying to do a GET request against a sharepoint site, but it doesn't populate when the url has a .aspx extension. For example if I do 'GET https://graph.microsoft.com/v1.0/sites/hostname.sharepoint.com:/sites/blablabla/UK' this populates a response fine, but if I do 'GET https://graph.microsoft.com/v1.0/sites/hostname.sharepoint.com:/sites/blablabla/UKDTAppKZ/something.aspx' then I get a 404 error suggesting this site doesn't exist... Could I get some clarification on how to use graph GET queries with sharepoint urls, specifically .aspx extensions?
In your first URL you're accessing the Site object for the /sites/blablabla/UK sub site, so you should get back a valid site object (assuming the URL is correct) as you indicated. To access the files in that site you need to access the Drives (Document Libraries) and then get the children or the specific item you're looking for. So the URL would look something like:
Path support isn't always consistent right now so wherever possible I like to use IDs if I know them.
So with an ID it would be:
https://graph.microsoft.com/v1.0/sites/HOSTNAME.sharepoint.com,SITECOLLECTIONGUID,SITEGUID/drives/DRIVEID/root/children
OR
https://graph.microsoft.com/v1.0/sites/HOSTNAME.sharepoint.com,SITECOLLECTIONGUID,SITEGUID/drives/DRIVEID/items/ITEMID
For Pages specifically though I would take a look at the Beta Pages API we added recently. If you want to do any operations (like publishing) to the page you'll want that API instead of the basic drive API.

How to get workflow history in Sharepoint 2010?

I want to create a web part in which I want to display history of all workflows that failed in the past certain time. The info that I want to get is the workflow name, its location (site URL), initiator and error date time. I am very new to SharePoint with ASP.Net background so I am having a hard time figuring out if there is some way in the API to that?
Kindly share if this is possible?
Its a hidden list so you can't get to it from All Site Content. You have to type the URL in directly, like below. And once you have the URL of the list you can query the individual fields
http://[servername]/[sitename]/lists/Workflow%20History

Set field via URL

Is it possible to have a field in the current item be changed by clicking a URL? The field would be a choice field with predefined choices.
Such as if the item field is currently:
Status: 2
If a user clicks the link, the field would now be:
Status: 3
If not, is there any other way for a user to easily change a field in the current item without actually haveing to visit the item?
Thanks!
Not Out Of The Box (OOTB) - but you've a few options.
Write an ASPX page to do what you want
Use something like SPServices and javascript to update the list item via the web services.
Use the Client Object Model (2010 only)
By the way - changing stuff on a 'get' can be dangerous as you can do malicious things - for example imagine you have a page that deletes the users account without any prompting (exact example doesn't matter) - what if someone clicks on that link by mistake or even worse what about an email sent with an image with that page as source URL - simply viewing the email could delete the users account.
It's not possible by using a GET request, but SharePoint 2010 is offering a RESTful API to manage ListItems from any client
The REST API is located within the virtual WebServices folgder under each SharePoint Site.
http://YourSharePointSite/_vti_bin/ListData.svc.
To perform an update on SharePoint ListItems you have to create a PUT Request. For more information on SharePoints REST API you should have a look at this MSDN site, there are also a lot of samples linked from this article.
Thorsten

how do sharepoint pages load?

I need to understand the load sequence for a sharepoint page that uses a query string to filter content.
If I pass in a query string, I assume that SharePoint first passes that query string to any web parts that need it, waits for the web parts to load their content then loads the final page? OR does SharePoint first load the page then pass the query to its web parts.
The QueryString is acessible in your webparts, it gets passed at the very beginning of the request.
Web Part is just another Control in the Page and it behaves in the same way as other controls, so same Page Execution Cycle happens in the WebPart pages as well and the Query String will be always avaliable in your WebPart code.

SharePoint list template migration error

Goal: Move SharePoint list from old site collection to new site collection.
Approach:
I save the SharePoint list as a template (.stp),
Then move .stp file to the new site collection list template gallery
Create custom SharePoint list using my newly created template
The SharePoint list populates perfectly.
Problem: when I try to edit or add items to the SharePoint list, I’m taken to the default SharePoint page “An unexpected error has occurred”
Open you web.config file of the SharePoint web Application, search for CallStack change it to true and seach for CustomError and set its value to Off. Do the action again you will get to know the actual error causing the error. Rectify it or post the error that will help to point out the issue.
Also notes in case of STP,
If have some LookUp field in the List template, you will need to recreate those fields again or Follow the workaround as described in article
If you have created any Site Column make sure that is there in the new site collection as well.

Resources