I’m currently at the MOSS Intensive Developer course being run by Mick Badran in Sydney and along the way Mick is dropping pearls of wisdom, tips and tricks from his experience with MOSS. Here are my notes…
1. Site Collections and Content Databases – if you want to create a new Site Collection within a web application and have it utilise a different content database than the site collections already created in the web application then:
- configure the maximum number of Sites for the each currently used content databases to equal the current number of sites in each;
- create a new content database;
- create a new Site Collection and SharePoint will recognise that the original content databases are full and automatically create the new site collection in the new content database.
2. To modify the number of menu levels displayed on the global navigation edit the default.master master page and update the property MaximumDynamicDisplayLevels to equal say 4 (2 is default). You may need to switch on the setting "Show Subsites" under navigation at the top level site settings.
3. Mick is using virtual server on his desktop instead of VirtualPC and commented there is a new tool called VMRC+ for working with virtual server on your system which removes the need to have IIS running on it.
4. Adding an item to a list with versioning for the first time occurs similarly to WSS2.0. First you save the changes and then call update but this sets version to v0.0 then v0.1. To overcome this instead call li.SystemUpdate() which saves without incrementing the version. This has been introduced in WSS3.0. It should be noted that this doesn’t write auditing data though.
5. Delegate controls in SharePoint are worth a look. Search box display uses delegate controls. Sequence number determines priority e.g. the higher sequence number gets dislayed. There is a good MSDN article about using delegate controls called How To: Customise a Delegate Control.
6. Enable ‘Content Type’ to be included in search scopes
7. Mick demonstrated code for a web part to enable you to embed a web delivered infopath form in the web part. I will load the code up here when I can a chance (or email me and I’ll send you a copy). The process involved the following steps that I scribbled notes on…
- copy XSNlocation string
- open Visual Studio
- create a new class,
- add ‘using Microsoft.SharePoint’
- add a reference to the infopath Microsoft.office.infopath.server.dll
- add ‘using Microsoft.Office.InfoPath’
- update the class to inherit from Webpart
- insert additional code from Mick to take care of the reference to the form.
8. Make use of features and solutions as much as possible to facilitate reuse and ease of recovery and rebuilding.