Monday, December 21, 2009

SharePoint DataViews don’t work after site export and import

Frequently Found Problem (FFP):

When using stsadm –o export and stsadm –o import, or SharePoint Desiger backup/import site for that matter, you will find that many of your DataViews and DataForms stop working on the newly imported site. The pages are riddled with web part errors complaining about not being able to access the data source.

Cause
By default, DataViews aka DataForms use the unique GUID of the lists they refer to, to receive data. When re-importing your site, the system reassigns new GUIDs for all the lists but does not clean up all existing references.

Solutions
Not so fast and dirty:
Manually fix the GUIDS after the import. Best option here is to open up the pages which stopped working (Views, WebPart pages, New, Edit and Display Forms of customised lists) and look for the keyword ListID in the document. You will find between 1 and 4 occurrences (normally 3-4) closely followed by the GUID of the list or document library in question. Simply update this GUID to the new one (extracted from the URL of the list settings page of the list) and you’re back up and running

Faster and not quite so dirty:
Change the references from absolute GUID references to named references. Open the pages at fault and look for ListID again. But this time replace the actual occurrence with ListName and replace the GUID that follows with the actual name of the list. This is best done before you do the export, or even better right after you created the custom view so you don’t have to worry about it later again.

Fast and clean
Instead of using the OOB stsadm –o import command to import the data, use one of the wonderful stsadm extensions a guy called Gary Lapointe developed. Although not officially supported by Microsoft, you will find them used by the MS pros themselves in their solutions. (Just look at the AdventureWorks Sample Site package)
One of these is the gl-import2 command which allows you to retain the GUIDS when importing the data.
stsadm -o gl-import2 -url "http://localhost" -retainobjectidentity -filename exportpackage.cmp

Using the above command you do not need to worry about mucking with the Views and Forms in SharePoint Designer at all. Notice the added magic keyword of –retainobjectidentity.

Tuesday, October 6, 2009

Multiple Templates per Document Library

I recently got a typical FAQ in my inbox:
"I have set up a sharepoint document library which has a template associated with it, whereby when you create a new document by selecting "new" from the menu bar, the document opens using the associated template.
What I would like to know is, is it possible to associate multiple templates to a document library so that when creating a new document by selection "new", you are offered a choice of templates to use? I'm hoping this is possible!!!"

Nothing simpler than that. The magic word is called Content Types. Okay. Two words then.
You can associate one template with a document library and associate one template with a content type(CT). As soon as a document library(DL) has more than one content type associated with it you will get more than one option when hitting the little arrow next to the new button. Careful, hitting the "New" on the New button will always start up the default CT, which is the first in the list.
So what to do next? Go to the site where you want to use multiple templates and under Site Settings go to the Content Type Gallery. There you create a new CT based of the existing CT called "Document". Now under Advanced Settings of that CT you can upload a new template to use when the New action is chosen. Finally go to Settings page of the DL in quesiton and enable multiple CTs under Advanced Settings of that DL. That will bring up a new section on the Settings page called... "Content Types" where there is a link to add from existing CTs. using that link add your new CT to the list and you're done. You can add as many as you like, but beware, the list should not get too long or you will get usability problems.
One last tip. You can create new CTs at the root of your site collection or within an individual site. CTs are visible only to the site you created it in and all its sub sites. So creating it at the root makes it visible across the whole site collection, but creating it in a specific site will make sure it does not appear further up in the hierarchy or in any of the sibling sites. This can be handy when certain CTs only make sense for specific DLs or specific sites. It is a good idea though to sit down and have a good think about where these CTs could be used and plan ahead where to create them.

Monday, September 28, 2009

Busted! Importing Profiles from multiple organisational units in Active Directory

One big drawback of the way AD implements LDAP is the lack of support for querying on Organisaitonal Units. No matter what you try, you will hit a brick wall when trying something like OU=SharePoint or OU:SharePoint in a simple query. Even trying to access the value as a property of an AD object will fail as OUs are not stored as properties on objects but only form part of the hierarchy and not part of the metadata. So, when importing profiles into SharePoint, the only place where you can enter an OU is when you are selecting the datasource, before applying any filters. Which means only one single OU, right? Wrong. read the solution at SharePoint Mythbuster.com

Thursday, September 24, 2009

Busted: Customising the application.master

There are numerous articles out there about how to change the system master page. The one that all pages in the _layouts aka LAYOUTS folder use. In most cases they want to do this to enable a different datasource for the top navigation aka global navigation. The average rookie who is in charge of creating a site in MOSS using the publishing feature will stumble across this problem and start hacking away at either the original application.master, or even go and implement a custom http handler to exchange the application.master with a custom one on the fly. None of these approaches are best practice nor are they supported by MS. So is it impossible to fix without breaking the system? Not at all.
I've published a solution to www.sharepointmythbuster.com! It will allow you to replace the top navigation on the fly for all pages in the site collection, including those horrid system pages and application pages.

Wednesday, September 16, 2009

Gettting Started with SharePoint development

Microsoft put together ten labs for Developing on SharePoint and also provided a fully functional VPC for you to get started. Time for the image is running out, as it will expire on 30/09/09. So if you don't have your own SharePoint development environment and wish to have a look at what all the hype is about go and download the image quick

VPC Image:
http://www.microsoft.com/downloads/details.aspx?FamilyID=1beeac6f-2ea1-4769-9948-74a74bd604fa&DisplayLang=en

WSS Hands on Labs:
http://www.microsoft.com/downloads/details.aspx?familyid=B885DCE8-C93F-48AA-B798-4422FEBCC200&displaylang=en

Loads of Resources, Demos, and online Walkthroughs
http://www.microsoft.com/click/SharePointDeveloper/

Thursday, September 10, 2009

SharePoint Event Troubleshooting Tips

Gary from Combined-Knowledge pointed out this useful post in the WSS SDK today.
http://msdn.microsoft.com/en-us/library/aa979520.aspx
It is a great little list of issues you will come across when working with Event Receivers in SharePoint. You're bound to have come across the one or other weird behaviour when implementing events. You're not alone. The above list mentions a dozen common issues to be careful of.

How to Pre populate Form Fields in SharePoint

Can't do it better than the boys over at Endusersharepoint. A great JQuery script which works universally with all kinds of Field types including lookups and date time fields.
Just plonk this onto your EditForm or the page with your Dataview and off you go.
Sadly there are no delegate controls on the built in EditForm.aspx for you to override automatically so you will have to either customise the editforms or build your own for your cusotm content type or cusotm lists definition.

http://www.endusersharepoint.com/2009/04/20/jquery-for-everyone-pre-populate-form-fields/

Monday, August 24, 2009

SharePoint Server Limits

Often I get asked in classes what the limits are for SharePoint. Like how many files can I have in a document library and how many folders, how many lists in a site etc.
Microsoft published a really nice whitepaper on technet covering loads of limits, from how many user profiles per farm to how many items in a list.
http://technet.microsoft.com/en-us/library/cc262787.aspx

One thing to keep in mind though: IT IS ALL RELATIVE

Having 50000 items in a document might be quite feasible on the right farm, but if you're using your SQL Server for other stuff and he is running at max speed anyway (150+ Transactions per second for example) you will feel the pain faster than when he's got 4 quad cores, 20GB of Ram and is generally quite bored (10-50 Transactions per second)

Another good post I managed to scrouge of the internet is on the limit of columns in a list. The above article claims you can have up to 256 different field types in a list and up to 4000 columns. But can you? If you ever come across the column limit exceeded error message or your columns are not behaving the way they should (filtering not working properly for example) then you have reached the field type limit.
http://support.microsoft.com/?scid=kb%3Ben-us%3B823555&x=6&y=5%20http://support.microsoft.com/?scid=kb%3Ben-us%3B823555&x=6&y=5

These were the settings for WSS 2.0 and SPS 2003:

64 Single line of text and Choice (drop-down menu or radio buttons)
31 Multiple lines of text and Choice (check boxes (allow multiple sections))
32 Number and currency
32 Hyperlink
16 Date and time
16 Lookup
16 Yes/No
8 Calculated

in WSS 2.0 these limits were set and they were transferred to WSS 3.0 Although they are not enforced the same way no more and you can end up creating more than those in some cases, expect the system to start acting up and behaving badly when exceeding those limits.

Thursday, August 20, 2009

Edit only your own on document Libraries

This is another one of those features which people cry for. You have that option on Lists via the advanced settings but not on libraries. WTF?
Well, it has to do with the implementation of that feature. Which is pretty bad by the way. The edit only your own setting does not integrate into the permission model but is a final check before an item is saved. Thus it does not work well with items which can be saved without the use of an application page, like from within word directly.
There are some blogs out there suggesting reactivating the feature on libraries using some code and following functions
SPList.ReadSecurity http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splist.readsecurity.aspx
SPList.WriteSecurity http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splist.writesecurity.aspx

but that does not get around people saving directly from within office.
Thus the only way right now to achieve something proper and stable is to create an event handler catching the modified event which checks who the creator was and responds accordingly.

Wednesday, August 19, 2009

Browse button on Send To Other Location in SharePoint

Wilson has put together some time ago now a great little article on how to add the object picker aka a browse button to the "Send To" page in SharePoint. this has been an asked for feature by many customers and the solution is not that hard. it includes creating a custom copy.aspx, a custom core.js and a custom site definition.
http://planetwilson.blogspot.com/2007/08/how-to-add-picker-to-send-to-other.html

You could also create a feature which adds the custom copy.aspx page to the ECB context menu of an item, but you would end up with two send to options in the context menu.

I prefer the feature approach as it is more resillient to change and service packs. Modifying the core.js means you need to check for changes after each update to make sure that the old core.js syntax still works with the new updated version of sharepoint.

Tuesday, August 18, 2009

Enabling Content and Structure tool in non Publishing Sites

Often I get a request for having the content and structure tool available in the Site Actions on a normal collaboration site. This is often the case when the root of the portal has the publishing feature activated and then subsites were created using the team site template. The solutions is pretty simple and can be achieved easily using a feature.
All you need to do is create a feature which adds a link to /_layouts/sitemanager.aspx to the Site Actions menu.
Site Owners can get to this link already via Site Settings in the collaboration site, but site members have no access to the site settings page and thus it seemes that site members can not access the content and structure tool from the subsite.
Below is a sample feature and elements xml to create the missing link in the site actions.
Feature.xml:
<?xml version="1.0" encoding="utf-8"?><Feature Id="FEAD7313-AE6D-45DD-8260-13B563CB4C72" Title="Content and Structure Site Actions" Description="Enables the Content and Structure Site Actions Menu Item" Version="1.0.0.0" Scope="Web" Hidden="FALSE" DefaultResourceFile="core" xmlns="http://schemas.microsoft.com/sharepoint/"> <ElementManifests> <ElementManifest Location="menu.xml" /> </ElementManifests> <ActivationDependencies> <ActivationDependency FeatureId="A392DA98-270B-4e85-9769-04C0FDE267AA" /> </ActivationDependencies></Feature>
menu.xml:
<?xml version="1.0" encoding="utf-8"?><Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <CustomAction Id="ContentStructureMenu" GroupId="SiteActions" Location="Microsoft.SharePoint.StandardMenu" Sequence="20" Title="Manage Content and Structure" Description="Reorganise content and structure in this site" ImageUrl="/_layouts/images/SMT_SMALL.png"> <UrlAction Url="javascript:window.location='{SiteUrl}/_layouts/sitemanager.aspx?Source=' + encodeURIComponent(window.location)" /> </CustomAction></Elements>

Enabling discussion boards for email interaction

Funnily enough I have not found many people complaining about the lack of proper email integration with discussion boards. Probably because they are all using Outlook 2007 by now :-) and there you have full Discussion Board integration just like you can integrate tasks, contacts and calendars.

Within Sharepoint there is the option to accept incoming emails for lists and libraries. This feature works like a dream. First you configure your incoming email settings in Central Administration (Operations Tab) and then configure an incoming email address for the list or library in its settings (Communications column beneath RSS settings).

So far so good. Now you should be able to start new discussions simply by sending an email to a discussion board. An example email address could look like salesdiscussions@portal.litwareinc.com . Cool! But how do you reply to a thread?
This is where the main option is missing. You can only reply to a discussion if you subscribed to it and received the discussion in your email. But guess what, that option does not exist in SharePoint.
You might think, "hey, let me try alerts" And although they are a great tool for all other kinds of lists and libraries, they are not meant to be discribution channels for discussions and thus replying to an alert will not get you anywhere near where you want to be. Two problems. first, the sender is a fixed email address for all alerts, so replying to it will not end up in the list that you want to end up in, and secondly the format of the email is totally wrong for email threads.

Now If you posted the original thread via email, opened that email from your sent items, replied to it by including the original text in the email and changed the To: email to the one of the discussion board, it would actually work! Whopee!
So SharePoint is clever enough to strip out the "Re:" bit, match the subject up and also match up the body to figure out which post you're replying to.

Thus the only feature which is really missing is the Discussion Subscription mechanism and the distribution of discussions to the subscribers.

There are a few options thinkable. Now these are just hypothetic...
1) Create an event handler for the discussion board which reads out the alerts set up on the item/list and sends an email to the subscribers.
PRO: simple to set up and maintain
CON: users receive two emails, the subscription and the alert.

2) Create a feature which replaces the alert feature on that discussion board and maintains its own list of subscribers which then get "spammed" through an event handler.
PRO: users only receive on email
CON: need to create additional User Interface components for subscribing and unsubscribing to discussions and discussion boards

3) Create your own custom email alert handler to catch the alerts and reformat them by adding the original body and changing the reply to field to the list's email address. here is a great article to get you started on this route:
How to create a custom email alert hander by Microsoft http://support.microsoft.com/kb/948321
Just the SPUtility.SendEmail function does not allow you to specify a reply to address, so I would use a different email sending function such as the built in smtp functions in System.Net.Mail.

Two great articles on customising alert templates in general:
1) How to customise the built in alert template by Brett Lonsdale at Combined-Knowledge http://www.combined-knowledge.com/Downloads/Modify_Alert_Notifications.pdf

2) customising Alert Templates in WSS 3.0 on the SharePoint Team Blog
http://blogs.msdn.com/sharepointdeveloperdocs/archive/2007/12/07/customizing-alert-notifications-and-alert-templates-in-windows-sharepoint-services-3-0.aspx


I've tried playing with the custom alert handler and got as far as sending out minimal streamlined emails but the date stamp on the email is different and thus the email hander is not clever enough to match them up. thus you would need to write your custom incoming email handler for the discussionboard as well. here is a link to get you started:
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spemaileventreceiver.aspx

Wednesday, August 12, 2009

Showing multiple Content Types in the Content Query WebPart

A common myth is that it is not possible to show multiple different types of content in one CQWP. The trick is that it can not be done using the web interface but can be achieved either via SharePoint Designer or by editing the source xml of the web part directly. The trick is not to think content types but list/library types. you can create a custom search query which will look in multiple different lists by the list type id and pull out the items. as long as the content types you are aggregating are related in a parent/child relationship they will be pulled together. Thus you can create a content query webpart which shows both web pages and documents in one list.

Effectively you need to add two attributes to the CQWP
ContentTypeBeginsWithId="0x0101"
and
ListsOverride="<Lists BaseType='1'></Lists>"

The ListsOverride is the important bit. Here I'm specifying any list which is a document library, as web pages live in document libraries it works like a charm.

Tuesday, August 11, 2009

Damsel's Den - The Dragons Pitch to You

It’s about time the tables were turned and the “dragons” (actually a neat group of business angels from Angel HQ) pitched to the entrepreneurs. Come along and find out who they are, what they’ve done, what networks they can access, what other investments they’ve made and how they’re going etc, and of course what they look for in a great opportunity to invest in.

In true UP Style, this event will be fuelled by pizza and beer.To RSVP for Damsel's Den visit > http://up.org.nz/damsels-den/

Incoming Email woes in SharePoint 2007

A common error you will get is "Error in the application".

If you're having problems with activating an incoming email on a list or library in WSS or MOSS (only when activating the automatic contact generation in an OU) then you probably have one of two problems.
Either you forgot to give the CA Service account enough permissions on the OU group or you don't have Exchange installed. Yes, you need exchange to use the OU feature. As SharePoint tries to add some attributes to the AD objects, and exchange makes them available.

here is a nice blog explaining some of these issues:

http://blogs.technet.com/jks/archive/2009/03/04/how-to-deal-with-an-error-in-configuring-incoming-e-mail-settings.aspx

Sunday, August 9, 2009

Best SharePoint Training

The time has come where I can learn from the best there are.
Without a doubt Bill English (mindsharp) and Steve Smith (combined-knowledge) count to the top SharePoint dudes around and I have the priviledge to study their material. I'll be in the UK for the next three weeks to get up to scratch on their material and am looking forward to passing the knowledge on, once I'm back in NZ.
Sounds simple? Not at all. I'm totally freaked out! These folks know SharePoint inside out and expect nothing less of me. So the last few weeks was spent reading, researching and reading more to prepare for the upcoming course and teach back. Wish me luck and who knows, maybe I'll be teaching the best SharePoint training material there is in a city near you soon.

Friday, August 7, 2009

Gadgets, Games and Geeks

Wellington’s Leading Techfest - Returns This Month with Silicon Valley-based Keynote Speaker

This month the eagerly awaited annual Gadgets, Games and Geeks showcase of Wellington’s vibrant and thriving information and communication technology (ICT) sector will take place at the St James Theatre on Courtenay Place.

Geeks, Gadgets and Games, to be held on Monday, August 24 from 4.30pm, offers an exciting opportunity for the public to see both the latest innovations and catch-up on industry trends, developments and expertise. Organised by Wellington’s leading networking organisation for ICT professionals, Unlimited Potential (UP), Gadgets, Games and Geeks has established itself as the premier showcase and networking event for Wellington’s ICT sector.

“It is always exciting to bring to the public’s attention the latest innovations from a city that has earned a reputation as New Zealand’s ICT capital, having spawned such innovative businesses as Trade Me, Weta Workshop and Xero,” said UP chair Tom Reidy.

“Gadgets, Games and Geeks is a great opportunity for anyone interested in what’s hot in Wellington’s IT space to view the latest gadget, game or geek-friendly technological innovations produced by some of Wellington’s smartest IT inventors, suppliers, manufacturers and entrepreneurs.”

UP is especially pleased to announce it has secured renowned Silicon Valley-based IT entrepreneur, Bill Reichert as the event’s keynote speaker. Reichert, Managing Director of seed and early-stage venture fund, Garage Technology Ventures, will share insider knowledge and tips on starting and growing a successful technology business during an address titled, The Future of Innovation: Entrepreneurship, Venture Capital, and Emerging Technologies.

Event Details:
When: Monday 24 August 2009, time: from 4.30pmWhere: St James Theatre, Courtenay Place
Entry: FreeTwitter feeds: #ggg09; Flickr tag: GGG09To RSVP and for more information: http://up.org.nz/ggg-09/

About Unlimited Potential
Unlimited Potential was set up in 2000 as a non-profit organisation to facilitate the growth and development of professionals at the forefront of ICT in Wellington. It does this primarily by providing opportunities for people working in Wellington’s ICT industry to meet and share ideas in a relaxed and friendly environment through events and forums. The network has more than 2000 members working in every type of ICT role across the industry, including start-ups, corporates, education, and government departments. www.up.org.nz


About Bill Reichert
Bill Reichert has over 20 years of experience as an entrepreneur and an operating executive. He was a co-founder or senior executive in several venture-backed technology start-ups, including Trademark Software, The Learning Company, and Academic Systems. Before that he worked at McKinsey & Company, Brown Brothers Harriman & Co. and the World Bank. Bill has a B.A. from Harvard College and an M.B.A. from Stanford University. He was a founding board member and a Chairman of the Churchill Club, and a Charter Member of the Silicon Valley Association of Start-up Entrepreneurs. In 1998 Bill joined Garage Technology Ventures (founded by well-known author and entrepreneur, Guy Kawasaki) and has since focused on early-stage information technology and materials science companies. www.garage.com

Contacts
Tom Reidy, Chairman, Unlimited Potential, phones: 021 779 298 (mobile), 04 210 0955 (work), email: tom@up.org.nz.
Anamika Vasil, Communicator, phone: 021 494 005 (mobile), email: anamika@up.org.nz

Daisy, Family Reunion 2009


Family Heep 2009 035
Urspr√ľnglich hochgeladen von Alxdean
Daisy is the cutest thing! We met at the family reunion in Mainz and fell in love with each other instantly! Well. maybe not quite. She started screaming each time she looked at me (God knows why...) Daniel and Carol can be proud to have such a cute, fun and bright kid.

Microsoft Learning: Microsoft Certified Master Program

Microsoft Learning: Microsoft Certified Master Program

Hey folks, They are already working on the 2010 material. In theory that is great news! Get certified on the newest technology while it is hot off the press and avoid all the teething problems we all had when 2007 came out and nobody was around to give us best practices. But there is also some sad news involved. From December onwards you will not be able to gain a SharePoint 2007 MCM Certification no more. Once they roll out the 2010 curriculum they will close down the 2007 track.
What does that mean? That all customers who need support to clean up their 2007 mess and are looking around for a 2007 super guru will be looking at existing 2007 MCMs first before evaluating 2010 MCMS.
Will a 2010 MCM have the same indepth understanding of the 2007 platform as a 2007 MCM? Of course. If not more so! But will customers understand this fact? probably not. the worst are the HR managers and recruiters which have no understanding of the MS certificaitons. I just remind you of the countles recruiters turning down MCITPs while they were looking for MCSEs.

So the final verdict. Is it worth while doing the SharePoint 2007 MCM before it expires? Do the math first.
Devin did a nice little calculation on the ROI of the MCM program There he explains how the increased productivity already is worth its weight in gold.
And all you consultants out there. Be honest. How many hours of brooding over tricky and difficult problems have you not been able to bill to your customers. You're working 50 hours a week and billing only 40? sound familiar to anybody? that's at $100 an hour over 48K a year which you are not billing out. Just halving the lost time from 10 hours to 5 hours due to skill, knowledge and new connections is worth more than the cost of the program including travel, accommodation and food. Not to mention the fact that you will get away with an increase in your charges of upt to 50% in some cases. i.e. charge out at $120-$150 instead of the $100.

Will I be doing it? All depends on how fast I can get the cash together.

Wednesday, August 5, 2009

Adding Themes the supported way! - Robin | zevenseas | SharePoint Blog

Adding Themes the supported way! - Robin zevenseas SharePoint Blog
Ever screamed at SharePoint that Themes are such a hassle and you have to jump through hoops to make your custom themes selectable by the end user?
Up until recently the only options were to either create a feature which applies the custom theme or to muddle with the SpThemes.xml file (preferrably also done through a feature).
Robin on the other hand came up with a better solution. He created a solution which has a configuration interface in CA which allows admins to define multiple themes.xml files (no muddling with built in files that are prone to be overwritten in an upgrade).
To load the custom xml file he used a feature to hide the existing site actions menu entry and replaced it with his own application page. There he loads the default themes and custom themes into one dataset and displays them as if nothing had changed.

But be warned! Although he spent much effort on sticking to the API and the way it was coded previously (Reflector is such a great tool) his solution is not 100% upgrade proof. If the MS developers decide to change the way themes work and muddle with the classes the page could crash. But that's the beauty of features. Deactivating the feature will remove the new link and put the old link back and you're back to Vanilla.

Happy theming!

WSS 3.0 Tagging Web Parts

Windows SharePoint Services (WSS) V3 Search - Tagging Web Parts
The above link is for a simple alternative to the bells and whistles version by kwizcom. It is a free and simple Tag field plus Tag Cloud which pulls the items out of the sitecollection that have the field populated. Not the most refined option but a start and definately worth expanding upon.

SharePoint Tagging Feature : kwizcom.com

SharePoint Tagging Feature : kwizcom.com

I've been spammed by a friend recently with lots of interesting SharePoint related links. This one is a real gem. Have not tried it out yet, but the screen shots are very promising. A full tagging feature with tag management, tag clouds, search filtering with tag categories and tag cloud and more.
I was asked at my Search presentation about Tag Clouds for SharePoint and I wish I had stumbled upon this one before.

Check it out or your selves and tell me what you think!

Tuesday, June 9, 2009

SQL Server Autogrowth for SharePoint

I was aksed today what Autogrowth setting would be best for a SharePoint Content Database. The simple answer? None! Autogrowth is one of the biggest resource eaters on badly designed SharePoint SQL Farms and can cause serious performance and stability issues (plus wreck havoc with your Hard Disks). The best option is to start big enough for your initial load and plan growth ahead.

Example: You are starting a new SharePoint ECM project and are planning on migrating 5 GB worth of files into the SharePoint Sites at go live. You also realise that you have never used versioning before and your staff will be quite active on about 10% of those files. Expecting to create on average one new version every week. i.e 500MB worth of new data being added every week. Thus scheduling a db file growth of 500MB during every weekend would deal with versioning. Add 100MB for new content to total it up to 600MB for week 1, 610 for week 2, 620 for week 3 and so forth, taking into account the growth of the files and the increase on versioning.

Having a sound versioning strategy with a cap for Major and Minor versions will help reign in this excessive growth!!!!

Obviously you will not always get it right and thus a combination of large Autogrowth (for example in 100MB increments) and weekly scheduled growth will give you the best combination for maximum performance and stability.

The final statement? Try to minimise the amount of times the dbs autogrow as much as you can by planning ahead, and when they do auto grow mak sure the increments are large enough to keep you going withminimal disruption until the next scheduled growth. Don't make them too large either as fetching hard disk space for the db files can put a strain on the Disks at the most impractical times like during peak hours and impair the stability of the system

Theme not updating on refresh

If any of you have been working with themes in your visual studio projects you probably didn't get them right frst time. Heck, you probably didn't get them right after the 50th update. If you're creating the theme in a wsp and keep on deploying it and are only working on one single site with no sub sites, then you won't have the update issue. But my guess is that you do.

As soon as you apply a theme to a site it copies the theme.css into the site under the _themes folder. This means the page is automatically unghosted and any changes simply won't show up unless you remove the theme and reapply the theme. The solution to the dilemma is to put all the real css stuff into a separate css file somewhere in the hive (preferrably under layouts/styles or layouts/1033/styles) and only reference it from the theme.css using the import statement.

Sure it is a bit hacky, and yes, you would also put all the images into a folder outside of the actual theme folder but hey! a) it works, b) you can see your changes reflected instantly across all sites using the theme and c) it still can be packaged into a feature and wsp package meaning you'll be fine even after the next update.

Heather Solomon, the master of sharepoint css has a great article on how to do the referencing with themes on her blog:

http://www.heathersolomon.com/blog/archive/2008/01/30.aspx

Friday, June 5, 2009

updating a layout using features

It is well known now that probably the best way to use site definitions and features is to start off with the most basic definition and do as much as possible in the feature. That also includes things like page layouts and master pages.
Words of warning. Ghosting and Unghosting can trick you into thinking that the updates are not working. As soon as you decide to customise a page using SPD which was deployed via a feature, SharePoint will put a copy into the database and always load that one instead of the ghosted one on the file system. Thus you can update your feature as often as you like, you won't see the changes. Solution?
make sure you have all modificaitons in the source file and reset the layout page to Site definition. Strictly speaking it never was part of a "site definition" but part of a feature, so you won't find the Reset button in SPD, but you can still reset it manually using the web interface. Simply copy the url of the page in question, go to Site Settings and there you will find a link to Reset to Site Definition where you can past the link.

Something Else I noticed though. If you customise the layout page to include web parts on creation using the AllUsersWebPart tag, like the Table of Contents Webpart in Andrew Connel's Minimal Site Definition example, each time you reinstall the feature a new instance of the web part will be added to the layout definition, causing multiple instances to be created on the new page creation. So try to stay away from web part customisation in layouts if you can.

Finally, you might want to make other property changes, like providing a new Preview image url or modifying the content type or such. These settings live on the list item and not in the file. Editing the item will solve those problems but as soon as you check your changes in, the page will be unghosted and you're back at the first dilemma. No worries though. Simply reset to site definition again and you're as good as gold. Yup, the changes to the list item don't go lost when doing that reset, so you won't lose those updates.

Regards

Bye Bye Groove, Hello SharePoint Workspaces

In the past many people have asked me what this Groove thing is about. Looks like a miniature version of SharePoint I was told by some. Others called it the Briefcase on Steroids. Most people who were implementing SharePoint though called it surperflous. And they had a point!
With a good Information Architecture and Enterprise Content Management Strategy babsed on SharePoint a tool such as Groove should not be required. Especially as it was not SharePoint compatible and mimicking a file sharing application more than a collaboration tool.
I'm not saying that Groove was a bad idea. Having a desktop tool which makes working on shared documents easier and more intuitive without the need to use a web interface for access is a great idea. That's why making Groove SharePoint savvy and making it more like a SharePoint Workspace tool makes even more sense.

Still in its infant stages, but there is now a new blog for the new project
http://blogs.msdn.com/sharepoint_workspace_development_team/
A good place to keep tabs on to see what kind of SharePoint Integration is coming in the next version of Office and how the bridge between SharePoint ECM and productivity applications is becoming stronger and more seamless.

Wednesday, June 3, 2009

Integrating AJAX Control Toolkit into SharePoint

Hey folks, sorry it took me a week to get round to this blog post, but I needed to make sure I could upload all the stuff somehow. This is going to be a big one, so sit back, relax and enjoy the show:

Ajax Control Toolkit

A compilation of dynamic controls
—With and without Server Side interaction
—Built on the System.Web.Extensions Components
—Samples at http://www.asp.net/ajax/
—Source at http://www.codeplex.com/

Prerequisites

Minimum
—ASP.NET 2.0 AJAX Extensions v1.0
—Ajax Control Toolkit 20229 (.net 2.0)
—Windows SharePoint Services 3.0 SP1
Recommended
—NET Framework 3.5 SP1
—Ajax Control Toolkit 30512 (.net 3.5sp1)
—Windows SharePoint Services 3.0 SP2

How to get it running? a combination of tweaking the web.config, and clever web part design

Configure the web.config

<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere" />
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>

Allow Ajax controls on the pages

<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</controls>
</pages>

Add Extensions Assembly

 <assemblies>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</assemblies>

Add Ajax Http handlers

<httpHandlers>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers>

Add Http Module

<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</httpModules>

Add WebServer config section (IIS7.0 only)

<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated" />
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode“
type="
System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</handlers>
</system.webServer>

Optional, add profile config

<system.web.extensions>
<scripting>
<webServices>
<authenticationService enabled="true" requireSSL = "truefalse"/>
<profileService enabled="true” readAccessProperties=“First,Last"
writeAccessProperties=“First,Last" />
</webServices>
<scriptResourceHandler enableCompression="true" enableCaching="true" />
</scripting>
</system.web.extensions>

IMPORTANT: Mark Ajax controls as Safe

<SafeControls>
<SafeControl Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TypeName="*" Safe="True" />
</SafeControls>

Add Script Manager to Page

To the master page right at the top
<asp:ScriptManager runat="server" ID="ScriptManager1"></asp:ScriptManager>
Or programatically in a baseclass for your AJAX enabled Webparts
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
if (ScriptManager.GetCurrent(this.Page) == null)
{
ScriptManager scmanager = new ScriptManager();
scmanager.ID = "scriptManager";
Page.Form.Controls.AddAt(0,scmanager);
}
}

Next up: a sample WebPart that uses the AutoComplete control from the toolbox . Before you can use the toolkit you will need to download and compile the project though. Then add the reference to the toolkit in your WebPart Project.

using System;
using System.Runtime.InteropServices;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Serialization;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.WebPartPages;
using AjaxControlToolkit;

namespace KnowledgeCue.WSS.AjaxWebParts
{
[Guid("6ef07bde-99b3-45d0-8dd4-33ce7ae25572")]
public class AutoCompleteTextBox : KnowledgeCue.WSS.BaseWebPart
{
Literal textBoxLabel = new Literal();
TextBox textBox = new TextBox();
AutoCompleteExtender autoComplete = new AutoCompleteExtender();

public AutoCompleteTextBox()
{
}

protected override void CreateChildControls()
{
base.CreateChildControls();
string webServicePath = "http://wss-1:90/_layouts/AutoCompleteService.asmx";

textBoxLabel.Text = "Type the name of a cool dude";
this.Controls.Add(textBoxLabel);
textBox.Attributes.Add("id", "SelectCoolDudeTextBox");
textBox.ID = "SelectCoolDudeTextBox";
this.Controls.Add(textBox); ;

autoComplete.MinimumPrefixLength = 1;
autoComplete.ServicePath = webServicePath;
autoComplete.ServiceMethod = "GetCoolDudes";
autoComplete.TargetControlID = "SelectCoolDudeTextBox";
this.Controls.Add(autoComplete);
}
//Script Manager Fix
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
if (ScriptManager.GetCurrent(this.Page) == null)
{
ScriptManager child = new ScriptManager();
child.ID = "scriptManager";
if (this.Page.IsPostBack)
{
this.Page.ClientScript.RegisterStartupScript(typeof(AutoCompleteTextBox), this.ID, "_spOriginalFormAction = document.forms[0].action; _spSuppressFormOnSubmitWrapper=true;", true);
}
if (this.Page.Form != null)
{
string str = this.Page.Form.Attributes["onsubmit"];
if (!(string.IsNullOrEmpty(str) !(str == "return _spFormOnSubmitWrapper();")))
{
this.Page.Form.Attributes["onsubmit"] = "_spFormOnSubmitWrapper();";
}
this.Page.Form.Controls.AddAt(0, child);
}
}
}
}
}

Finally, the Webservice which the autocomplete textbox relies upon:
<%@ WebService Language="C#" Class="AutoCompleteService" %>

using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Web.Script.Services;
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ScriptService]
public class AutoCompleteService : System.Web.Services.WebService {

[WebMethod]
[ScriptMethod]
public System.Collections.Generic.List<string> GetCoolDudes(string prefixText, int count) {
string[] dudes= new string[] { "Alex Dean", "Chandima Kulathilake", "Rachael Greene", "Dean Moor", "Duncan Hammond" };
System.Collections.Generic.List<string> dudeList = new System.Collections.Generic.List<string>();
int i = 0;
foreach (string dude in dudes)
{
if (i == count) break;
else
{
if (dude.ToLower().StartsWith(prefixText.ToLower()))
{
dudeList.Add(dude);
i++;
}
}
}
return dudeList;
}

}

SPVisualDev File exists in Template Error

I've stumbled across this one and it took me some time to figure it out. That error will crop up if you are deploying a file either via a feature or site template twice. In my case I had two Modules in an elements file to split up the Preview images from the actual files being deployed to the masterpage gallery. that's where SpVisualDev gets its knickers in the twist. Can't deal with multiple modules in one file and keeps on adding all files to the last module. also the ones that are already referenced in the first one.
Fix? put all files into one module or SPVisualDev will screw with the elements and it won't work.

Basic Publishing Site Definition

Andrew Connell wrote in his great SharePoint 2007 WCM book how to create a Minimal Site Definition to use for Publishing Sites. The idea is to have a clean starting point for new Projects which use Features as the main tool for customisation. The Site Definition itself is pretty basic and stripped down to its bare necessities while all the fun stuff lives in Features. A great way to start a project is to plan ahead what functionality will be living in different features, adding basic shell like features to the definition at the start and actually do the coding later. But even if you didn't plan for everything in advance and realise that there is a feature missing or a piece of code that can't be integrated into an existing feature, simple staple it on top of the Site Definition in hind sight and you're as good as gold.
Wrox Press also give you the code for that Book for download on their website. The Solution for the Minimal Site Definition you'll be lookng for lives in Chapter 5. But beware, there are a few bugs in the download. Check the Errata for Errors in Download and fix up the onet.xml and publishing layout page.
One thing that was missed totallly in this definition is the fact that all pages should live in the Pages Library. Also the homepage. In the example from Andrew, the home page lives WSS style in the Root. Not very clean. The fix is simple enough though: Change the url of the page (preferably even changing the default.aspx to actually use the layout properly!) and you're ready to go. Here is my version of the last entry in the onet.xml file:


OLD:
<Modules>
<Module Name="Default" Url="" Path="">
<File Url="default.aspx" NavBarHome="True" Type="Ghostable" />
</Module>
</Modules>

NEW:

<Modules>
<Module Name="Default" Url="$Resources:cmscore,List_Pages_UrlName;" Path="">
<File Url="Default.aspx" Type="GhostableInLibrary">
<Property Name="PublishingPageLayout" Value="~SiteCollection/_catalogs/masterpage/PSATOC.aspx, ~SiteCollection/_catalogs/masterpage/PSATOC.aspx" />
<Property Name="ContentType" Value="$Resources:cmscore,contenttype_welcomepage_name;" />
</File>
</Module>
</Modules>

Thursday, May 28, 2009

Exception handling Base WebPart

This piece of code will revolutionise the way you develop web parts in sharepoint. No more pages crapping out on you, no more crashes or unsolvable problems. All exception handling done for you automatically without the need to include a single try/catch block. I'm not saying you should not handle exceptions which you can forsee. But those are the easy ones. What about those unexpected ones?
Andreas Knudsen, a fellow SharePoint Programmer came up with a beautiful solution which takes full advantage of a combination between early and late binding to force the runtime to execute the exception handling version of the base routines before execuing your implementation code. As I'm not even going to try to take credit for this gem, get the code directly from the genius himself

http://andreascode.blogspot.com/2007/12/general-exception-handling-in-web-parts.html

How does it work? Playing with polymorphism is the answer.
The runtime always tries to find out the best version of a method on an object to call, no matter what type the pointer is.
When you put a line of code like

MyWebPart.CreateChildControls()

into your own code, the runtime will not have to look far, as you're calling it on the type of which the object is. But...

WebPart x = MyWebPart;
x.CreateChildControls();

Now the runtime will need to start at the base class WebPart and figure out which version is the best to call. Normally each new version overrides the old one and the runtime will end up at MyWebPart.CreateChildControls(). Unless you put a stop sign in between. Such a stop sign is the new keyword. When you have a class in between WebPart and MyWebPart (like MyBaseWebPart) and instead of writing public override CreateChildControls() but public new CreateChildControls() the runtime is forced to take a step back and execute the one a level up. To make it more visible you can seal off the exception handling method, just to be sure nobody tries to override it.

So now we've forced the runtime to execute the version of code that has exception handling. How do we get back to our implementation code? Through sidestepping the Stop sign. You need a new class which inherits from the exception handling class for this. the exception handling one calls a new function like CreateChildControlsX and the runtime will again try to figure out the best version and will end up in derived.CreateChildControlsX because you overrode it there. Here you simply call the original function name again (CreateChildControls) and the runtime will find the best version again. Now the runtime is not starting at the top (WebPart) but at the current location (derived) and thus the Stop sign is left behind and it can go all the way down to your implementation and execute that.

I know it sounds so geeky, But thise piece of code is seriously cooooooool.

Tuesday, May 26, 2009

SharePoint Explorer View in Windows 2008 and 2003

If anybody out there has been building demo machines on Windows Server 2008 or Windows Server 2003 you will have run into this issue at some point. Explorer View does not work on document libraries, nor can you map a network drive to a sharepoint site.
Following constellations come together:

a) the server platforms effectively don't like web folder views until you install the fix KB907306
That fix works for both Windows 2003 and 2008.
Now you can happily map a sharepoint site to your network places and use the Windows Explorer to browse the sharepoint sites.

b) your browser now complains that "This folder cannot be opened in Internet Explorer". This will happen when you have IE 7 or higher and protected mode is on. Simple. Disable protected mode via Tools>Internet Options>Security. Remember to add the site to the Intranet Zone

c) What? can't disable the protected mode on Windows Server 2008? No problem. Open the Server Manager. On the root node of the tool you should see Server Summary within there is a section for Security Information. Here you will find a link to Configure IE ESC (Enhanced Security Configuration). That's where you can disable the "microsoft parental controls for dummies" tick box.
d) now you can disable protected mode on the Intranet Zone.

You might ask, why not simply move the site to Trusted Sites. Well, Trusted sites actually have a higher security rating than Intranet zone. Plus you automatically get signed into the intranet zone and not to th trusted sites. Plus the sharepoint site is on the Intranet. So that is also the Zone it should live under!

PS. Running Windows Server 2008R2 or Windows Server 2008 SP1? Then try enabling the Feature called  "Desktop Experience" in the Roles and Features configuration of the Server

Happy Exploring!

Tuesday, April 14, 2009

Custom SQL Lookup Field in WSS 3.0

This is a question I get asked a lot! How to create your own version of the BDC Lookup for either WSS or MOSS. The answer is not simple. Nono. But not impossible either.
You need to create your own custom field that uses the Entity Picker to populate a list of records and allows you to pick one. There is a lot of CAML, XML, Classes, Events and Code to deal with.
Following is sample code to create just that based on another SharePoint list. Simply plug your own DAL instead of the SPQuery and you're up and running.
http://code.msdn.microsoft.com/WSS3EntityPicker

Step by step instructions:
http://msdn.microsoft.com/en-us/library/cc889345.aspx

Thursday, April 9, 2009

Best Practices for SharePoint - Blank Sites

If you ever plan on creating a new site, which starts off on a clean slate, especially with the WCM Publishing Features activated you must use stsadm to do that. Effectively three commands will get you started nice and simple with the most blank publishing site you can immagine:

a) create an absolute blank sitecolleciton with really nothing in it
stsadm -o createsite -url http://servername -ownerlogin domain\username -owneremail owner@domain.com

b) activate the publishing feature on the site collection level
stsadm -o activatefeature -name PublishingSite -url http://servername

c) activate the publishing feature on the web level
stsadm -o activatefeature -name PublishingWeb -url http://servername

That's it. go to your url and you will find the most minimalistic publishing site you will be able to get that has all the publishing features activated.
Now you can start building your own site template based on this and be sure that content deployment will give you less headaches should you ever decide to go down that route in future.

Upgrading WSS 3.0 to MOSS

Just came across a weird one. After doing an in place upgrade of a test installation the Publishing Feature would not activate. Keeps on coming up with an Access Denied message. Ok, so maybe I should have deinstalled WSS 3.0, installed MOSS clean and then reattached the content databases to be on the safe side. But hey, i did say it was a test machine.
The solution is not that obvious though. Looks like the Publishing Feature can't activate because the feature dependency Publishing Resources is not actice. Only solution is to activate the Resources manually via stsadm and then you can activate the publishing feature via the gui.

here's the magic command:
stsadm -o activatefeature -name PublishingResources -url http://YourSharepointSite
Happy upgrading!

Customising the SharePoint Calendar

A few days ago I came across a great post by syed.er's blog called Bending SharePoint without bending the rules. In November he talked about adding more items to the calendar view by adding MaxvisibleEvents to the Rendering Template for the Calendar. I decided to take that concept a level further.

Following problem scenario:
We need to be able to colour code calendar entries, add more than just the title to the item and break down the multi day events into separate blocks spanning across the whole day and not just a thin bar at the top which is easily skipped. All this without changing the insides of SharePoint. And the solution could not be simpler!

First of all you will need to create your own WebPart for the calendar. Sound daunting? not at all! you can easily implement the SPCalendarView control to do all the work for you.
Gunnar Peipmann has a great post on how to create a global calendar from multiple sources using the SPCalendarView.

The SpCalendarView control can also accept new Templates. So you copy the Rendering Templates for the Calendar Control from the C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES \defaulttemplates.ascx into a new ascx file, rename them and add the fields you want to the Item views. Then hook them up programatically with the SPCalendarView control and render the new output.

WARNING! Don't put the custom Rendering Templates into a subfolder. Although it might make perfect sense, they won't load properly programatically. Just use clear and concise naming conventions for your custom ascx page. Then use the SPControlTemplateManager.GetTemplateByName() function to get hold of the ITemplate programatically and plonk it into the Calendar View.
If you insist on having the custom template in a subfolder, check out Reverse Alchemy's post on loading templates programatically. He will show you how to use Page.LoadControl() as a workaround to SharePoint misbehaving.

You will need to populate the list of events manually though. I.e. use a SPQuery to get the events in a collection, iterate through the collection and create new Calendar Entries based on the list item. But Gunnar's blog will guide you through that. While you're recreating the calendar entries try changing the Backgroundcss attribute of the entry. :-) and voilla you have a colour coded calendar that has all the functionality of the normal calendar.
Ok. Maybe it is not quite as easy. I'll upload a step by step instruction sometime after easter if enough people pester me about it...

Monday, April 6, 2009

Adding Export To Spreadsheet to a Picture Library

Sometimes customers want to have all the functionality of a Picture Library but also that of a Document Library. Specifically the option to have a Excel Report on a bunch of images. Now that sounds simple. Just Expor to Spreadsheet. Well guess what. Some clever dude took that action out of the menu. Why? No idea. Because it does not work? Bollocks. Of course it works. below is how you can get it back again. Simply add a Custom Action to your feature elements and deploy. Happy Exporting.the trick is in dynamically creating the iqy string.

<CustomAction Id="UserInterfaceCustomActions.DocLibActionsToolbar"
RegistrationType="List"
RegistrationId="109"
GroupId="ActionsMenu"
Location="Microsoft.SharePoint.StandardMenu"
Sequence="1000"
Title="Export To Spreadsheet"
ImageUrl="/_layouts/images/MenuSpreadsheet.gif">
<UrlAction
Url="javascript:EnsureSSImporter();javaScript:ExportList('{SiteUrl}\u002f_vti_bin\u002fowssvr.dll?CS=65001\u0026Using=_layouts\u002fquery.iqy\u0026List={ListId}\u0026RootFolder=' + ctx.listUrlDir + '\u0026CacheControl=1')" />
</CustomAction>

Tuesday, March 31, 2009

SharePoint training from the best

Steve Smith and Ben Curry are coming to the SharePoint Conference and will be holding a five day hard core SharePoint Workshop. This is not for the faint hearted! Learn from the best in an interactive and engaging session where it is all about hands on and hats off.

When? The week after the conference 06/07 until 11/07
How? send a mail to chan@knowledgecue.co.nz to express your interest
Where? TBA

Course outline and registration will be online soon. Watch this space!

Cool SharePoint Themes

Microsoft has published a whole set of new and funky sharepoint themes
you can download them here




For those of you who have been playing with the SPG, you will notice that the Contoso theme is part of the update package for the Training Management Solution.

Finally, if you wish a faster and more comfortable way of using your themes, install the WSP file that Daniel Brown created and activate the themes on Farm level.
Daniel was so kind to installl the themes and make features out of them, packaged it all into a wsp and added a readme for instructions.

These themes make life a lot easier to customise the look and feel of your sharepoint installation. Either use them out of the box or pick the one you like best and adjust it with a few tweaks to your needs.

Monday, March 23, 2009

SharePoint conference Site Life

www.sharepointconference.co.nz
The SharePoint Conference is coming together nicely! Bookmark the above url to keep up to date on sessions, topics, speakers and everything that will be going on around the conference.

And yes, obviously I'll be holding a few sessions myself. Not telling which ones though :-)

Debbie, Chan and Mark are workring hard to pull off an event that will have the SharePoint community buzzing for ages to come. So make sure to sign up soon, because you can be sure that it will sell out in no time.

Sunday, March 15, 2009

March Wellington SharePoint User Group Session

See a WSS project site designed and built before your eyes in 60mins

A team of three will simulate and demonstrate the configuration of a common project site within SharePoint from analysis to completion.

  • See the IA and taxonomy for the project site designed and documented.
  • See the site columns, content types, lists and libraries configured for the site.
  • See the content views and project dashboard configured to bring it all together.

Date: Thu 19th March
Start: 6PM
RSVP: wlgspug@sharepointservices.net.nz
Venue: Microsoft NZ (Wellington), Level 12 Vodafone Tower, 157 Lambton Quay, Wellington


Late arrivals: Pls txt 021 775172
Presenters:Lulu Pachuau (http://www.lushai.com/) , Mark Orange (http://www.intergen.co.nz/ ), Chandima Kulathilake (www.chandima.net/blog/ )

Bye Bye ACE Training

Just to let you all know that I won't be found in the training rooms of ACE no more.

But no need to panic! I am still available to give training through my new association with Knowledge Cue. Just in a corporate and not public class room environment. Chan approached me last year and wondered if I was keen on contracting a bit to help out with the lack of SharePoint skills in this city. It fits in perfectly with all the other things going on in my life like Jigsaw, the new magazine we're publishing in Wellington. So expect to see me either working on the new issue of the mag, battling with advertisers, holding SharePoint Workshops, Creating new Solutions and Features, coaching and mentoring archiects and BAs or taking photos of some of the cool events around Wellington.

So if you're looking for some SharePoint training that is worth its weight in Gold, check out www.knowledgecue.co.nz

Thursday, March 12, 2009

New Zealand SharePoint Conference 2009

It is here! Wellington is slowly becoming the hub of SharePoint knowledge for the Asia Pacific region!
Beginning of July will see the creme de la creme in SharePoint come together to host two days of unforgettable WSS and MOSS excitement. Included in the programme will be Best Practices, Development workshops, Information Architecture Workshops, WCM Workshops and much much more. As there will be people in the know, expect to get one or the other hint at what is coming up in the next version 14 of SharePoint that will totally blow you away.


New Zealand SharePoint Conference 2009
July 2nd and 3rd Wellington – New Zealand
http://www.sharepointusergroup.net.nz/SPCONF

Friday, February 20, 2009

Content and Structure Reports: All Checked out documents

Ever wanted to see all documents that are checked out right now and deal with them all in one go? Not only the ones checked out to you? here is the CAML syntax for your Content and Structure Reports Library located at the root of your publishing enabled SiteCollection:

<Where><Geq><FieldRef Name="CheckoutUser" LookupId="TRUE"/><Value Type="int">0</Value></Geq></Where>

Simply create a new Item in that list with the above text for the CAML syntax, give it a Title and meaningful description and you're set!

Content and Structure Reports: Stale documents

Ever wanted to find out where your unused documents lie in MOSS?
This is the syntax to find all documents that have not been modified in the last year. The field to check against is the Last Modified Date. Best is to use it's ID.

<Where><Leq><FieldRef ID="{173f76c8-aebd-446a-9bc9-769a2bd2c18f}"/><Value Type="DateTime" IncludeTimeValue="TRUE"><Today OffsetDays="-365"/></Value></Leq></Where>

Remember not to have any whitespace in between the tags, especially no CRLF.

The trick here is not to use [Today] but instead also use the OffsetDays to go back and forward in time and if you want to make sure that the time is matched, include the IncludeTimeValue="TRUE" attribute. This attribute comes in handy in many cases when you want to check against "Now".

Friday, February 13, 2009

50047 Advanced IT Pro SharePoint Course

Oh man,
I'm so hyped up, it is unbearable. Just finished the last day of teaching this course and can't believe how great this course is. It covers everything you need to know and more. It is jam packed with best practices, advice and tips. Follows best practices, teaches all relevant skills and is fun, fun, fun.
Anybody who wants to know how to get the most out of their MOSS installation MUST go on this course
Anybody who is starting a career as MOSS Admin must go on this course
Anybody who is planning on creating a MOSS infrastructure, is a Enterprise Analyst, Enterprise Architect, Solutions Architect or Information Architect/Analyst must go on this course.
Any MCT who wants to teach 5060 or 5061 should have read this manual thoroughly.

It is the bible for a good SharePoint Architecture. It is the mother of all SharePoint courses!

Always asked yourself how index and query roles affect performance? Wanted to know what actually goes into the SSP Search DB? Wanted to know what Raid configuration works best for the different Application Roles? Wondered how easy or hard it is to setup Database mirroring in combination with SharePoint? It is all in there.
Which Performance counters to monitor (ok, some are missing...), Which Components to worry about, which platforms to choose when architecting your farm. All in there.
How to create your own BDC App config, How to work with scopes, crawl rules, managed properties and different content sources. All in there. Hey even how to create a new search tab.
Get Excel Services up and running, publish workbooks and install Adminisrtator approved infopath form templates. All in there. Best practices when doing capacity planning. Real world scenarios when thinking about content analysis. Good ideas on approaching taxonomy issues.

Geez. there is so much in the course that I actually ended up skipping around 25% of the content across the board and asked the students to read up at home.

I'm soooo looking forward to teaching this course again soon. Shame only two people turned up for the last one, but then I was happy, as it was my first teach and I can experiment a bit when the class is small.

There is no excuse anymore for lousy SharePoint Specialists out there. Anybody who wants to call themselves a SharePoint Specialist and is lacking the knowledge and experience must go on this course.