Posts Tagged ‘SharePoint Development’

Editing The SharePoint List Item Menu (Part 1: Using Elements)

Date:November 4th, 2010 Author: Tags: , , , ,
Category: SharePoint Development, SharePoint Ideas, Training Comments:2 ;

The lovable modal boxWhile copying my rapidly lengthening scribbled to do list into a SharePoint Tasks list, my unconscious habit of middle-clicking items to come back to was being constantly foiled. Instead of opening a new tab the modal box kept popping up in the middle of my screen (new to 2010 I hear).

The drop-down menu options did exactly the same, leaving no alternative but to right-click the item, copy the link, manually open a new tab, paste it in, and switch back; much too much like hard work. So I decided to add an option to open the item in a new window… in retrospect probably harder work than just putting up with it.

The default item menu
The modified item menu

As a result, this is a brief run-through of how to add options to the context menu of list items in SharePoint, using a CustomAction in Visual Studio. For using JavaScript to the same ends, see Part 2: Using JavaScript (coming soon).

(more…)

Showing the records ID on the View and Edit forms

Date:July 23rd, 2010 Author: Tags: , ,
Category: SharePoint Ideas Comments:33 ;

SharePoint - Modify View and show ID column

ID’s are a convenient, often short, way to uniquely refer to something. Unless you’re the Tax man who seems to believe he can’t get through his day without giving me, thats just one person, 7 unique id’s – presumably one for each extremity that he would like a piece off…

I digress… ID’s – SharePoint uses an ID for each item in a list and sometimes its handy to know them “Ere Bob – have you done task 1234 yet?”

You can easily add them to the list view (Modify this View then find the ID column, click display)

SharePoint - view with ID column

But what about if you want to see this on the View and Edit forms? (You can’t see it on the New form as it doesn’t get an ID assigned until you’ve created it)

You can’t do this in the UI. You can create a custom View/Edit form using SharePoint designer but its quite complex, is a pain when we add new fields and its fraught with potential problems.

So instead we’re going to look into every ones favourite SharePoint UI hacking tools – the Content Editor Web Part (CEWP) and javascript/jQuery.

(more…)

SharePoint Feature Receivers – the hidden details

Date:June 15th, 2010 Author: Tags: ,
Category: General, SharePoint Development Comments:2 ;

Warning –  this post is somewhat techie so if you’re not a developer you may want to go find something more interesting to do!

I’ve been doing some work with SharePoint Feature Receivers recently and found the official documentation to be somewhat … lacking.

SharePoint Feature Receivers allow you to run code when a Feature such as a web part or template is installed, activated, deactivated and removed. They are often used for installation/setup tasks that can’t be done using XML incantations in Manifest.xml, Elements.xml and Feature.xml.

I am not going to give a step-by-step guide to Feature Receivers (see the excellent How to add a Feature Receiver to a Feature from SharePoint dev wiki) but plan to detail information that I was struggling to find anywhere else.

(more…)

Setting a default duration for new SharePoint Calender Events

Date:September 30th, 2009 Author: Tags: , , ,
Category: General, SharePoint Ideas Comments:15 ;

Tristan asked in another post

“When a calendar event is being created, I want the end date/time to automatically populate to 1.5 hours after the start date/time.  Seems simple, but haven’t found a formula for this yet”

new-event-thumb

Sounds like a pretty reasonable suggestion and the Calendar lists NewForm.asx already sets the Start time to the current time – shouldn’t be too hard, right?…

(more…)