| Paul's profilePaul Galvin's SharePoint...BlogListsSkyDrive | Help |
|
August 20 SharePoint User Group Webcast TonightTonight, 08/20/08, the Connecticut SharePoint user group meeting is broadcasting a webcast in lieu of a physical meeting this month. Tonight's topic: "Microsoft Office SharePoint Server 2007 - Extranet deployment methodologies" Microsoft's own Chris Lavista will lead the discussion. I've worked with Chris before and he really knows his stuff. If you have any interest in this subject, check it out. Here are the details: SharePoint User Group Webcast: https://www.clicktoattend.com/invitation.aspx?code=130299 Topic: Microsoft Office SharePoint Server 2007 - Extranet deployment methodologies Date: August 20th Welcome Time: 6:15 PM Time: 6:30 PM -8:00PM
Registration & More Info: https://www.clicktoattend.com/invitation.aspx?code=130299 </end>
Technorati Tags: User Group August 05 Has Your Search Committee Met This Month?It's the beginning of the month and now is as good a time as any for your company's search committee to get together and analyze Best Bets, successful and not so successful searches, etc. You don't have a search committee? Then form one :) WSS and especially MOSS search benefit from some human oversight. Investing a few hours a month on a consistent monthly basis is not only more fun than a barrel of monkeys, it can:
Who should be on search committee? You would know your people best, but consider:
Happy analyzing! </end> Technorati Tags: Search August 04 Quick and Easy: Get SPFolder of SPItemListI keep running into this problem and the Google never seems to understand what I want to do, so I figured I would write this down. I've been doing a lot of event receiver debugging in the last week or two. The ER is defined against a document library. The individual items in the document library are tightly related to their parent folders. So, I am always getting the folder of the item for various manipulations. While debugging, I needed to update the metadata of a folder for a specific item whose ID I know. Here's a little console application (designed to run on server in the farm) that takes two arguments: the ID of an item and a value to assign to a field, "Approval Status". It hard codes a lot of stuff and has no error checking. The code looks up a hard coded site, gets a hard coded document library and then finds the indicated item. It then finds the parent folder of that item and assigns the status value. The key lesson here for me is that SPItem doesn't get you access to the folder. You need to use SPListItem.File. If anyone cares to offer a critique or suggest a better way to get the folder of an item, please leave a comment. <code> using System; using System.Collections.Generic; using System.Text; using Microsoft.SharePoint; using System.Collections; namespace Conchango { /// <summary> /// </summary> class ManualFolderUpdate { static void Main(string[] args) { string msh = "ManualFolderUpdate (v1.0): "; // msh = "Message Header" Console.WriteLine(msh + "Starting up. I was last modified on 08/04/08."); string url = http://localhost/xyzzy; using (SPSite oSPSite = new SPSite(url)) { using (SPWeb oSPWeb = oSPSite.OpenWeb()) { SPList docLib = oSPWeb.Lists["Documents"]; Console.WriteLine(msh + "Got the document library."); Console.WriteLine(msh + "Doc lib item count: [" + docLib.ItemCount + "]."); int FolderID = 0; string NewStatus = "xyzzy"; FolderID = System.Convert.ToInt32(args[0].ToString()); Console.WriteLine("Seeking folder for item: [" + FolderID + "]."); SPListItem li = docLib.GetItemById(FolderID); SPFolder thisItemFolder = li.File.ParentFolder; Console.WriteLine(msh + "Got the parent folder."); NewStatus = args[1].ToString(); Console.WriteLine("Setting status to [" + NewStatus + "]."); Console.WriteLine("Press return to commit the update or CTRL-C to abort."); Console.ReadLine(); thisItemFolder.Item["Approval Status"] = NewStatus; thisItemFolder.Item.Update(); Console.WriteLine(msh + "Finished updating the folder. Exiting."); } // using SPWeb } // using SPSite Console.WriteLine(msh + "Finished."); } // Main } // class foldersync } // namespace </code> </end> Technorati Tags: SharePoint Programming August 03 Sunday Morning Funny: "Dad, He Doesn't Even Know You"We northern New Jersey Galvin's are big fans of the political satire t.v. program, The Daily Show hosted by Jon Stewart. I don't like to get political in my blogging, so all I'll say on that is that without the Daily Show, I may well have permanently lost all of sense of humor on or about 12/12/2000. We were having a meal on the deck early last week and my ten year old son brings up a recent episode of the Show. I made the comment, "Jon Stewart knows that he better not make fun of me or there will be terrible consequences for Jon Stewart." My son thinks about it for a minute and says: "Dad, number one: He doesn't even know you." I waited for a number two, but he decided that was enough and moved on to the next subject without skipping a beat. It used to be that I could get a lot more mileage out of those kinds of jokes, but he's getting too used to me or too mature or both. I need to adjust somehow. </end> Technorati Tags: Funny August 02 Employee Training Schedule and Materials Template -- Seat Count Bug PLUS Security Fix(?)This is a fairly popular "fabulous 40" template. It also has a bug which is widely known (I've even blogged about how to fix it). Sogeti released a codeplex project this week that fixes the bug (which is nice by itself, but not earth-shattering) but they also claim to have solved a much thornier problem: security. The fab 40 template requires a very generous security setting (users needs contributor level access to virtually everything). Not any more! According to the codeplex summary:
That's good stuff and worth checking out. </end> August 01 SharePoint Designer Workflow, Event Receivers and "Update List Item" versus "Set Field in Current Item"We have a set of SharePoint designer workflows that "communicate" with an event receiver on the list via changes to site column values. For example, if a site column "SetDuedate" is set to true by the workflow, the event receiver detects that change, calculates a due date and assigns that date to another site column, "Due Date." We split things up like this because the event receiver can calculate a due date using complex business rules (taking weekends and company holidays into account) while SPD really can not. In one specific instance, we ran into a problem with this trick. Debugging all this is pretty difficult, but we came to the definite conclusion that in one case (at least), the event receiver was not running all the time. In one step of the workflow, we would change the value of a site column and the event receiver didn't appear to run. However, it was running consistently in a different step of the workflow. After reviewing it, I noticed that the happy workflow step used the "Update List Item" while the other step used "Set Field in Current Item." Update List Item was updating the "current item." I'm not sure why we picked one over the other since they would seem to be doing the same thing. So ... the Update List Item action did cause the event to fire. On the other hand, the Set Field in Current Item action did not. I used Update List Item in both places and viola! It worked. [[ Total aside, I played the violin for on a daily basis for almost 15 years ]] From this, I tentatively believe that the "Set Field" action does not cause event receivers to fire, at least some of the time. This issue bedeviled us for weeks. This is one of those "observed behavior" posts. I observed this happen once in a specific environment and I'm making some guesses as to why things happened as they did. If you have any insight into this one, please share in the comments. </end> Technorati Tags: SharePoint Workflow |
|
|