tirsdag den 14. december 2010

70-573: Top 5 answers

1. Client object model: .ExecuteQuery() is missing somewhere after Load method
2. Memory leaks, bad performance: site.Dispose() is missing
3. Permissions, sandboxed solution: RunWithElevatedPrivileges is either missing or not supported
4. Not the right answer: Changes in Web.config, overwrite standard SharePoint files, and modify registry
5. Always the right answer: change Onet.xml

søndag den 12. december 2010

Upgrade to SharePoint 2010 – top 5 hurdles

1. System requirements: Minimum 4GB RAM, 64-bit Windows Server 2008 with SP2, 64-bit SQL Server 2005 with SP2 or later or SQL Server 2008.
2. Customizations: Just about everything, from master pages to MySites or RadEditor is customized, and you are afraid that it can’t be easily upgraded.
3. Social features, the ribbon etc.: Change even for the better requires additional resources and time to learn about the new platform.
4. People and technology issues: Who’s to blame if it doesn’t work; you, your vendor, or Microsoft? Is there an idea to wait for the official service pack 1?
5. Business value: Do benefits outweigh the cost of upgrade?

lørdag den 11. december 2010

Top 5 things I like about SharePoint

Besides being a corporate news channel and storage for documents, can you name 5 things SharePoint is used for in your organization?

Let me help you with top 5 things I like about SharePoint:
1. Document management: documents and pages based on document/page templates and content types, and metadata driven navigation and search
2. User Profiles: clearly defined and easy to find user skills, responsibilities, and activities
3. Lists: more effective and flexible work with information held and displayed as calendars, surveys, car rental, tasks, Q&A etc.
4. Role based content: metadata (skills, department etc.) in your user profile defines the content that you see; news, documents, pages, and lists
5. Web 2.0: Even the corporate news can be a two way communication with comments and rating that allows you to contribute with your knowledge and opinion

tirsdag den 4. maj 2010

SharePoint 2010 custom stylesheet for standard list views

Custom List View XSL or how to change Add new item link to Add new umbrella link

Each time you create a list in SharePoint, you also create a List View web part that displays the content of the list. List View web parts works in the same way as all other web parts. You are able to pick a list view or change web part title. They are phenomenal, as long as you stay at the same site (web) as your list.
I noticed a new tab in the Tool Pane that opens when you select Edit Web Part. Aside from Appearance and Layout tabs, there is new Miscellaneous tab, and I was wondering for some time about a XSL Link property text box. It looks much like the ItemXslLink property for Content Query web part. I used ItemXslLink property to write a reference to another XSL file and override the standard link to ItemStyle.xsl file, stored in Style Library. I used to copy the content of the standard ItemStyle.xsl and create my own styles. My problem with List View and XSL Link was that List View web part doesn't link to XSL file that is stored somewhere on the portal. Well, everybody can create XSL file and upload it, but what is the chance that it will work. Zero, I think.
I got it to work though. There are easy three steps:
1. Get the standard XSL stylesheet
2. Upload the XSL stylesheet in Site Assets library and modify it
3. Configure the List View for your custom stylesheet

1. Get the standard XSL stylesheet:
- create a list in SharePoint 2010
- open the list in browser
- click on List tab in the ribbon and choose Modify View->Modify in SharePoint Designer.
- click on XsltListView web part in Design view
- click on Design tab in the ribbon
- click on Customize XSLT->Customize Entire View
- copy all the code starting and ending with xsl stylesheet tag

- open Notepad and paste the code
- save the file as ListView.xsl file

2. Upload the XSL stylesheet in Site Assets library and modify it
- open SharePoint 2010 portal in SPD
- click on Site Assets
- click on Import Files in the ribbon and upload ListView.xsl
- check out the ListView.xsl and open it
- locate 'Add new item' and change it to 'Add new umbrella'
- save and check in the file

3. Configure the List View for custom stylesheet
- add the ListView web part for yor list to the page
- click on the web part title and select Edit Web Part
- expand Miscellaneous tab
- write: /SiteAssets/ListView.xsl in XSL Link text box
- click on OK button to save the web part settings


Other Things I Wrote
Customize Content Query
Image Renditions in SharePoint 2013
The Story About SharePoint 2013
SharePoint 2013 JavaScript - Office Store App Licensing Script
Use ListView in SharePoint 2013 Apps




mandag den 8. februar 2010

Customize Content Query in SharePoint 2010

In SharePoint 2010, there is no need to define CommonViewFields in Content Query web part in order to display custom fields. As in SharePoint 2007, the Content Query web part in SharePoint 2010 is set to display items via XSL file ItemStyle.xsl.The new and very cool feature that comes with SharePoint 2010 is that Content Query web part detects the fields such as Title, Dsecription etc. that are defined in the XSL file and displays those fields in Tool Pane. Each field is displayed as a text box for you to enter the field name.

It's much easier to understand if you try it your self. Let's say that you have Customer content type that has a Title,Comments, and Products fields (columns).
Here is the example of how to display Title, Comments field as description, and a Products custom field.
0. Create Customer content type and a list with this content type
1. Add a Content Query web part to the page
2. Select the list and a Products content type
3. Change the name to Products in Appearance and click on OK button in the bottom
4. Click on the arrow in upper right corner of the web part's title and choose Export
5. Save the web part as Products.webpart to your desktop
6. Open the root of your site collection, click on View All Site Contents and open the Style Library
7. Open XSL Style Sheets folder
8. Select ItemStyle.xsl and click on Download a Copy in the ribbon
9. Save the ItemStyle.xsl file to your desktop
10. Open the Products.webpart file in Notepad
11. Locate the ItemXslLink property
12. Change it to


13. Save the changes
14. Open your site in browser or SharePoint Designer and open Site Assets library
15. Upload the ItemStyle.xsl file into this Library
16. Open the site in browser, edit the page
17. Click on Add a Web Part in web part zone and click on Upload a web part
18. Browse to Products.webpart and upload it
19. Click on Add a Web Part again and add the Products.webpart
20. Open the Tool Pane for Products web part and fold out the Presentation group.
21. Here you can see Link, Image, Title, and Description text boxes in Fields to display
22. Click on OK button and save the web part settings
23. Use SharePoint Designer to open the ItemStyle.xsl (in Site Assets library) and locate



24. Scroll down and you'll find



25. Open the Tool Pane for Products web part and write Comments in Description text box, and save the web part settings (click on OK button)
26. Open Site Assets library in SharePoint Designer and check out the ItemStyle.xsl file
27. Add @Products to the XSL like this:



28. Save and check in the ItemStyle.xsl
29. Refresh the page in browser and edit the Products web part
30. When you open Presentation group in Tool Pane, you'll see a new text box called Products
31. Write Products in the text box and click on OK button to save the web part settings

Other Things I Wrote (SharePoint 2013)
Script Editor and Embed Code
JavaScript - Add List with Columns
Adventures with Napa Apps in SharePoint 2013
Install SharePoint 2013 Public Beta with no Domain Controller
Metadata Driven Navigation
Geolocation