Skip to main content

Posts

Showing posts from 2010

SharePoint "Like" button

Ever wondered what the users of your Intranet really like or don't like? Ever wanted your SharePoint 2007 site to be more "web 2.0"-ey? Well I've published this quick and dirty codeplex project that allows the addition of a "Like" button the any SharePoint List item page.
The project is available as a WSP, and source code.
It consists of two things - a Web Part that is the button that users click to "Like" or "Unlike" something, and a List Template that can be used to create a list to store who "Likes" an item.
The button has two ways of operating. If it finds a list that was built on the List Template included in the WSP, it allows each user to Like or Unlike an item as they see fit. The button uses the List it found to keep track of who likes a given item, and queries the list when it renders to determine which option should be presented. Along with the button, the web part also displays a brief message explaining how many pe…

SharePoint Designer Workflows - Custom String Actions

It's been a while since I've posted anything, but thought I'd put this one up.

I've just finished creating a project on codeplex that adds a bunch of standard .Net String functions, and a formatting function for DateTime values, to SharePoint Designer workflows.

With the WSP deployed to the codeplex project, the following methods are made available as SharePoint Designer Workflow Actions, simply by deploying the WSP and activating the Web Application feature contained within:

Contains - .Net String method
EndsWith - .Net String method
Entry - custom procedure that uses the delimiter provided to split a string, and return the entry occuring at the position provided
FormatDate - .Net DateTime method
IndexOf(string) - .Net String method
IndexOf(string, startIndex) - .Net String method
Length - .Net String method
Num-Entries - custom procedure that uses the delimiter provided to split a string, and return the number of entries
Replace - .Net String method
StartsWith - .Net St…

SPWeb ProcessBatchData - One or more field types are not installed properly

I've created a SharePoint Timer Job that will process the contents of a tab delimetered text file, parse it through an XML field definition file, that details information on what to do with each tabbed column, and pushes it in to a nominated list in SharePoint.

To do this efficiently, I've used the ProcessBatchData method of the SPWeb object. Initially, it worked, with a sample set of about 3 columns. However, with more and more columns added, I began to receive the following error messages, as returned by the ProcessBatchData method:


<Result ID="" Code="-2130575340"><ErrorText>One or more field types are not installed properly. Go to the list settings page to delete these fields.</ErrorText></Result>



<Result ID="" Code="-2147023673"><ErrorText>The operation failed because an unexpected error occurred. (Result Code: 0x800704c7)</ErrorText></Result>


I've encountered such problems in the pa…