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.
Tuesday, October 6, 2009
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.
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/
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.
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/
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.
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.
Subscribe to:
Posts (Atom)


