Retrieving Items from a SharePoint List with subfolders using CAML Filtering


When you run a CAML query to retrieve items from a SharePoint list, make sure that your CAML query tag does not include the <Query></Query> tags.  When you include this tag, the filters are disregarded and you will retrieve the entire list
e.g.
A caml query like this
<Query>
<Where>
<Eq>
<FieldRef Name=’Title’>
<Value Type=’Text>Title.xml</Value>
</Query>
Will not retrieve the list item.
Remove the <Query></Query> tags and you should be able to retrieve the results according to the filter specified.
Here is a sample

 image

Advertisements

Empty SharePoint’s Recycle Bin


If you have a lot of items in your SharePoint recycle bin, it will be a pain to select items and delete them page by page.

Here is a cool trick to empty the recycle bin without paging through them

http://itfootprint.wordpress.com/2008/03/14/empty-sharepoint-user-recycle-bin/

Windows SharePoint Timer service is not started


When you are trying to install a solution package built using the SharePoint installer from CodePlex, you may run into an issue during the install where you get an error message “Windows SharePoint Timer Service is not started”.

The installer is unable to verify the status of the timer service and hence throws this message.  To remedy, start the install using the application pool account or a farm admin account and the installer would continue its process

6 Things that you think will work in SharePoint but doesnt


  1. When you have a Gantt view of the Task List, Web part connections are unavailable.  Hence you cant filter a Gantt View using the Filter Web Parts
  2. DateTime columns cannot be used for Grouping in the Content Query Web Part out of the box
  3. You cannot use the PortalSiteMapProvider to retrieve Navigation items from another site collection
  4. If you have a Date Column in a List, it cannot be used as a Lookup Column on another List
  5. If you activate a Feature on a site and then save it as a Site template and create a new site from this template, the FeatureActivated code doesnt fire
  6. You cannot write back to a List from Excel 2007.  This was available in Excel 2003. You will need Access for writing back to a List from Office (Update: Refer to WorkerThread’s link below for an add-in)

If you have any more of these oddities, please post in the comments and I will update this list

Edit: When you use the Content Migration APIs to copy lists and libraries from one farm to another, person fields do not copy over correctly

Create Publishing Pages on custom Document Libraries in SharePoint


Have you ever wanted to create pages in your custom document libraries in MOSS 2007 ?

When you click on Create Page under Site Actions, it always defaults to the Pages library. Well not any more.

Here is a great post on how to work around that limitation.

http://blogs.msdn.com/syedi/archive/2008/07/18/why-should-one-save-publishing-pages-in-pages-list-always-in-moss-bend-it.aspx

Some things to note after making these changes

  1. Import the Microsoft.SharePoint.Publishing namespace in your custom page
  2. Enable the Page Content Type for the document library for it to show up in the dropdown list

Office 2007 Integration with SharePoint


One of the frequent questions we encounter from our customers is

“Why do I need Office 2007 and how does it integrate with MOSS 2007”

Here is a great post on the  integration of the different Office applications with SharePoint

http://blogs.msdn.com/brittog/archive/2007/02/16/wht-you-get-with-office-2007.aspx

MOSS 2007 ULS Logs Folder in 12 Hive is Empty!


 

The Microsoft VHD for MOSS 2007 is a great time saver.  You can download the VHD from here

Download MOSS 2007 VHD

I am working on a demo for BDC and ran into some issues.  As usual when I looked at the 12 hive folder there were no logs.  Not a single log file.  I logged into the Central Admin Console and setup the Logging parameters and still nothing. 

I thought this might be related to the Timer service being corrupted and hence restarted the timer as well to no avail.

Poking through the services, I noticed that the Windows SharePoint Services Tracing service was disabled.  I set the service to Automatic start and the logs started to fill up.  It makes sense to disable this in a VHD by default, but a valuable lesson was learned. When some one else builds an MOSS 2007 image, do not assume all the services are on!

System.IO.FileNotFoundException when creating SPSite objects using the SharePoint object model


This is one of the interesting errors that we encountered recently. A console application was developed for content migration from a file share to SharePoint with an Excel file for mapping the files to specific content types. The application was run on our test environment and everything seemed to work fine. Of course we wanted to run this over the weekend. Time for easy deployment right since it is all tested and ready right? Wrong! When deploying to the server we came across this error

“Provider not registered in this environment” . After a bit of googling we realized the issue. Our test environment was running a 32 bit SharePoint installation, whereas the production version was 64 bit. Since we were using Jet drivers to connect to the Excel spreadsheet, we had to retool our application or target a specific architecture(since 32 bit drivers are available on the server). We chose the second option. We set the target platform to x86 and deployed it on production.

Update: Here is the forum post with the link to the solution. Scroll down to the 3rd comment with a link to the vbtips site  http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=125207&SiteID=1

Now we were seeing the dreaded System.IO.FileNotFoundException when creating SPSite objects in our code.

Apparently setting the target architecture to x86 and running the code on a x64 SharePoint installation, throws the FileNotFoundException. We changed the target architecture back to the default setting and had to retool the code to read the mappings using an Xml export.

Sharepoint – Managing Access Requests email


The SharePoint administrator for our client recently changed teams. She was still receiving all the access request emails and wanted us to move it to another user. This took quite a bit of snooping around, since the option is not available front and center in the Site Settings page. We looked at all the security groups and checked to see if there were any access request emails set up on the groups. All those groups looked fine, but she was still getting those emails. Then we looked at the site permissions and sure enough there was an option under Settings called Access Requests with her email in it.

 

SharePoint Single Signon Error 0x8063064a


Our environment had 2 front end servers with MOSS 2007. The single sign-on service was leveraged within the web parts and everything worked fine on one server. However the following message was found in the event log on the second front-end server.

Event Type:    Error

Event Source:    Office SharePoint Server

Event Category:    SSO

Event ID:    6494

Date:        7/1/2008

Time:        2:43:21 PM

User:        N/A

Description:

The Microsoft Single Sign-on (SSOSrv) service failed to store credentials for user <DOMAIN\UserName>, enterprise application definition postini. The error returned was 0x8063064a. For more information, see the Microsoft SharePoint Products and Technologies Software Development Kit (SDK).

Resolution:

The Microsoft Single Sign-On Service was running as “LocalSystem” on the second server. Once we changed that to run as the MOSS 2007 application pool account, everything started working back as usual.

%d bloggers like this: