Archive

Archive for the ‘ASP.NET’ Category

SharePoint: Recurring Events on Calendars

November 21st, 2008 No comments

While I am in the blogging mood today, I thought I would share a very helpful link. I was trying to figure out the proper way to retrieve the latest recurring events based on the current month. I Googled around for a bit before stumbling upon this:

http://blogs.msdn.com/sharepoint/archive/2007/05/14/understanding-the-sharepoint-calendar-and-how-to-export-it-to-ical-format.aspx

The key point is the query used:

SPQuery query = new SPQuery();
query.ExpandRecurrence = true;
query.Query =
    "<Where>" +
        "<DateRangesOverlap>" +
            "<FieldRef Name='EventDate' />" +
            "<FieldRef Name='EndDate' />" +
            "<FieldRef Name='RecurrenceID' />" +
            "<Value Type='DateTime'><Month /></Value>" +
        "</DateRangesOverlap>" +
    "</Where>";
// Look forward from the beginning of the current month
query.CalendarDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1); 

SharePoint: User Auditing

November 21st, 2008 No comments

At my current place of employment, my development environment is limited to creating custom SharePoint tools through SharePoint Designer. I typically create an override to the OnLoad method to get my work done.

Today’s topic: a simple interface for checking out who has group memberships and where they have them. I came up with the idea after seeing the constant organizational changes and the employee role changes associated with them. So let’s talk about the two parts. If you just want the code without the breakdown, scroll to the bottom of the full article.

Read more…