Sunday, February 25, 2007

Creating a Form to Edit FIelds in a SharePoint List Item

Copy and paste the EditForm.aspx page associated with the SharePoint list. Then delete the existing List Form control (as this can not be editted in the designer view) and on the SharePoint Designer menus choose Insert/SharePoint Controls/Custom List Form...

The Custom List Form Web Part displays all editable fields in the list, and these can then be moved, deleted, other appended or can be modified to be non-editable items by opening the Common FormFields Tasks dialog for each field. This allows the form control for each field to be rendered as formatted text.

SharePoint Designer Data Source Library Fails to Display Lists

Had an issue today where the Data Source Library pane in SharePoint Designer would not display any lists or document libraries from the current site, or from other sites I tried to add.

Eventually fixed this by removing all external data sources, open default.aspx page on the site, and refreshing the Data Source Libraries several times!

Monday, February 19, 2007

Office Tips from a Microsoft Partner Presentation

Just spent half a day at a Microsoft Resellers’ Roadshow – included some very informative presentations on Vista, Office and SharePoint. Even the licencing presentation was clear (others such presentation I have attended in the past have certainly been lacking clarity, due in a large part from the complexity of the programs. Well done to Carlos Martinez for that!).

A couple of little tips that came from the seminars;

  • The Office Migration Planning Manager (OMPM) is a handy tool for converting Office 2003 documents to OpenXML format. That conversion is not necessary for using those documents in Office 2007, of course, but it could be useful for reducing document sizes. Also can just be convenient for business analysis work, to determine the number of Office documents stored by a company – could also be used, I guess, in capacity planning exercises in calculating the size of document stores to be indexed by SharePoint search. The presenter gave an example of what to expect in terms of performance from that tool – it took 2 hours to analyse 16,000 documents for him. Note that it does not have to carry out the conversion, and can be used just for the analysis.
  • Group Schedules in Outlook can be a great time saver. They allow the schedules for a set of individuals and resources to be saved as a group for easy reuse when scheduling across this same combination of people and resources (outlined here).
  • Check the suitability of Vista on PCs across a network using the Application Compatibility Toolkit.

Thursday, February 15, 2007

Small Steps Web Site Launched

Have today completed and gone live with a new version of the company website at http://www.smallsteps.co.nz Still all static HTML at the moment, but I was focussed on applying the philosophy from the guys at 37 Signals. Basically I wanted to get something small live on the site fast, and tweak later. Will start using master page soon.

More experimention with CSS went into it's creation, along with a few design decisions made on the fly when various block elements appeared in unexpected places due to CSS rules - and the "accidents" made the design look better! I used a great book by Dave Shea and Molly E. Holzschlag (The Zen of CSS Design) to help me along the way.

Tuesday, February 13, 2007

Web Standards, and Testing Across Multiple Browsers

I have just finished converting a site from being table-based to being CSS-driven and standards compliant. The brief was to confirm to XHTML 1.1 and WCAG 1.0. Once the new design was in place, I needed to test the site against multple browsers, including mbile device browsers.

I experimented with two options;

  • Cross-browser testing was done using the service at BrowserCam, which I was very impressed by. The free trial on that site allows for testing across a sizeable combination of browsers and operating systems (from FireFox 1.5 on Linux, through Safari 2.0 on OSX10.4, right up to IE7 on Vista with most other combinations you'd ever need in between), and the pricing looks very reasonable compared with the difficulty of actually hosting the numerous combinations.
  • Mobile browser testing using the online Opera Mini simulator at http://www.operamini.com/demo/?url= Just add the URL you want tested in the query string, and you'll see your page presented in the Opera Mini. Note that there are some other mobile browser testing options.

Another option I have not yet tried is the BrowserShots site (currently in a 'Technology Preview' state).

The goodness of web standards shone through during the cross-browser testing. The site rendered well in all combinations of platform and browser apart from IE5.2 on the Mac (which seems to have problems with background images). And the site even worked well in Opera Mini once I had hidden an image and some promotional text using a stylesheet tailoerd for handheld media.

Which all goes to show that applying XHTML, semantic markup and all those other best practices really does work!

Tuesday, February 6, 2007

How to Package (aka Export or backup) a SharePoint 2007 Web Site

To move or save a web site, the following articles give various options and the advantages/disadvantages of those options:
The options boil down to Exporting to a web package (good at duplicating a site structure, but unable to save list data), backing up (included all data, but unable to save certain customisations such as workflows and alerts) or creating a Site Template (can include list data, but bad at replicating site columns and content types to a new site based on the template).

Error when a Connected Web Part is Deleted

Caused an error on a development site today by deleting two web parts without first deleting the connection between them. This action seems to have left an orphaned connection within the page source, as the default.aspx page then failed to open, instead showing the following error:

"Cannot find the connection provider web part for..."

To remove the error, it was necessary to open the default.aspx in code view in the SharePoint Designer, and to delete the WebPartPages:SPWebPartConnection element completely.

Saving and Deploying a Custom Content Type

If a SharePoint 2007 site includes site columns and a content type, saving that site as a site template and then creating a new site using that template does not recreate the content type.

Therefore it seems that the site columns and content type must be deployed as a feature. Luckily Mark Collins at Share This Point has written a great guide to using features for site columns and content types.

Monday, February 5, 2007

Customising the New and Edit Forms for SharePoint 2007

I was planning to customise the newform.aspx page for a document library in order to prepopulate a few fields, but was saved several hours of frustration thanks to the discussion threads on Jan Tielens' Blogging and Kristian Kalsing.

The story seems to be that modifying the forms for document libraries breaks the "Attach File" button.

Here's looking forward to a fix....

WSS Default Master Page Contents

A list of the placeholders on a default master page, plus a little other useful stuff about master pages, at http://msdn2.microsoft.com/en-us/library/ms467402.aspx

How to Reference the SharePoint Assemblies

(Thanks to .Net Geeks)

To develop against the SharePoint assembly on a machine that is not a server, check out the following:

Setting a Reference to the Microsoft.SharePoint Assembly

After creating a project, add a reference to the Microsoft.SharePoint assembly to import its namespaces and implement IntelliSense features in the Object Browser and Code Editor.
To add a reference to the Microsoft.SharePoint assembly

  1. In Solution Explorer, right-click the project, and then click Add Reference on the shortcut menu.
  2. On the .NET tab of the Add Reference dialog box, select Windows SharePoint Services in the list of components, and then click OK.
    To run or debug code that uses the Microsoft.SharePoint assembly, you must run the code on the server running Windows SharePoint Services. If you are using Visual Studio 2005 on a remote computer, you cannot run or debug code that uses the object model. However, you can set a remote reference to the assembly to write code and see the Microsoft.SharePoint assembly represented in the Code Editor. To add a remote reference in this way, do the following:
    Click the Browse tab and navigate to Microsoft.SharePoint.dll in Local_Drive\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\ISAPI folder on the server running Windows SharePoint Services. You may instead want to copy Microsoft.SharePoint.dll from this folder to a local drive on the remote computer, and then open this local copy of the DLL. Click Open.

(from http://msdn2.microsoft.com/en-us/library/ms479423.aspx)

Welcome

So much to learn, so here I go....

As I find useful things relating to SharePoint (MOSS and WSS 3), .Net, workflows and the application of all these things to business needs, I'll note them down here. Will be of value to me, and maybe you'll learn something, too.