Ron Cresswell's WOW (Words Of Wisdom)

It's a Web Log. It's just a place where I write down stuff that's useful to me. If it's useful to someone else, that's a bonus.

Feature Receivers FYI

Posted by roncresswell on 14 August, 2012

Quick note – upgrade of a feature doesn’t fire the feature receivers!!

Posted in Uncategorized | Tagged: | Leave a Comment »

Editing/Customizing a New Item Form through the UI

Posted by roncresswell on 19 July, 2011

Thanks go to this blog for this little pearl of wisdom:

For a new item form in a list, or apparently any page that doesn’t offer the “edit page” functionality (assuming it supports web parts of course – custom application pages, for example, don’t), add this to the end of the URL:-

?PageView=Shared&ToolPaneView=2

Or, if there are already parameters passed (in other words, there is already a question mark followed by a series of characters at the end of the URL), add it like this:

&PageView=Shared&ToolPaneView=2

(in other words it’s an additional pair of parameters that you are passing).

This allows, amongst other things, a way of injecting javascript into a new item form (see spcd.codeplex.com for a good reason you might want to do this!).

Posted in SharePoint | Leave a Comment »

Detecting SharePoint 2010 programmatically

Posted by roncresswell on 14 July, 2011

I’ve seen a number of different discussions about this – and for the most part they are talking about being able to distinguish WSS from MOSS. What I needed, however, was to distinguish MOSS from SharePoint 2010. That, it turns out, is really very simple.

The point is that SharePoint 2010 is installed in the “14 hive” whereas MOSS is installed in the “12 hive”.

In other words, the layouts folder in MOSS is by default installed here:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS

whereas SharePoint 2010 is installed here:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS

So a very simple way to tell which version we are installed in is as follows:

bool isSharePoint2010 = false;

string whereAmI = SPUtility.GetGenericSetupPath(@”TEMPLATE\LAYOUTS”);

if(whereAmI.Contains(@”\Web Server Extensions\14\”))

{

isSharePoint2010 = true;

}

Pretty simple, huh?

Posted in SharePoint | Leave a Comment »

Task list not sending emails when item created from a workflow

Posted by roncresswell on 29 June, 2011

Here’s an odd one. You have a workflow associated with a list or library, and everything works fine until one day – it stops sending email notifications. Took me a while but eventually I found someone out there in blog-land had the same problem. I haven’t been able to track down where I found it (I’ll update this when I do) but this is the fix that worked for me:

The fix appears to be to turn *off* the email notification setting, wait some time, and then turn it back on again. I tried this in my development machine and could see that it made a difference (not visible through the user interface, so I can’t check the effect in production).

The fix is this:

In the web site, go to the “Tasks” list, and go to “List Settings” > “Advanced Settings” > “E-Mail Notification” and set it to *No*

Wait at least 5 minutes

Go back, and set it back to *Yes*

Wait 5 minutes more and then test.

Update:- This is the forum where the solution (that worked for me in this case) was posted

Posted in SharePoint | Leave a Comment »

Hello world!

Posted by roncresswell on 28 June, 2011

Welcome to my minimalist (at the moment) blog!

I’m going to (try to) use this space to keep notes when I discover something interesting that I don’t want to lose (as opposed to writing it down on a piece of paper or in a notebook and then forgetting what it was and where I left it!)

So don’t expect a rich tapestry of useful information – and don’t expect all-original work either! If I need to remember it, I’m writing it down here. It’s not a blog, it’s a web log. That’s all.

Posted in Uncategorized | 1 Comment »