SharePoint as a platform on top of ASP.NET gives you many components that you don’t get from ASP.NET out of the box:
- WYSIWYG editing (IE only, no FireFox)
SharePoint’s rich text editor works really well with IE out of the box, works with SharePoint image libraries, and supports many features and even allows site style configurations to define and restrict styles that can be applied in the site. Unfortunately, it is not a cross browser compliant WYSIWYG editor.
In ASP.NET there are many 3rd party options here – but you won’t get the integrated support that SharePoint’s editor has, without doing further customization.
- Content Version Control (with Publish and Approval workflow)
SharePoint gives your end users content version control – they can update their pages and check-in to share it with the team, or publish it for everyone to see. Workflows can be attached to notify the necessary internal reviews.
SharePoint also tracks changes across versions (except in web part zones), and allows users to compare between different versions.
In ASP.NET this is not available – you will need to do significant work to achieve this behaviour, or build on top of another ASP.NET platform.
- Permission Control (just assign to Groups)
SharePoint allows items to be assigned to permission groups and works very well with Active Directory (or other membership providers) directly.
In ASP.NET site permissions can be specified via web.config but the UI to configure parts of the site is limited.
- Creating a subsite (simple and then appear in menus, breadcrumbs…)
End users can create subsites in SharePoint that automatically appears in menu navigation and has all the correct breadcrumbs wired up. Subsites forms the necessary site navigation within SharePoint.
In ASP.NET end users can not create subsites – developers has to do this.
- Spell check
SharePoint editor web parts come with spell check abilities.
ASP.NET does not have equivalent – though many browsers now support a client-side spellchecking facility, and some 3rd party rich text editors also have spell check.
- Search (filtered by your permissions) – google only works for anonymous
SharePoint comes with a highly configurable enterprise search facility. The search result is filtered based on the current user so SharePoint will never show results that you aren’t supposed to see.
SharePoint search can index Office documents as well as other popular document formats like PDF.
Search engines like Google performs well for public content, but there is no way for the search crawler to index inside your organization. SharePoint uses its own internal crawler to keep your site’s content up to date in the search results.
In ASP.NET - this is often overlooked – most ASP.NET search facilities are limited to only specific kind of data: e.g. search clients with the ID of SSW
DRAFT: InfoPath Rule number 1
Do you always set compatibility mode to design Rich and Web client forms?
This is the number one, and most important rule in working with InfoPath.
Always go for the lowest common denominator. It sure beats realizing half way later that your form can't be hosted on SharePoint InfoPath Forms Services!
<insert picture from InfoPath>
MOSS 2007 allows you to create a Data Connection Library to hold all the connection information that Forms and Excel services can utilize.
You should always use a Data Connection Library.
Data Connection Library provides a central location for defining all the connections to various data sources within your company.
- It allows you to change the data source definition in one place, without having to worry about changing the same definition in 50 forms and excel spreadsheets.
- A centralized data connection library also helps your users to locate data easily.
- Your users don't want to know the intrincate details on how to get a particular data - they just want the data and have the form working! So if you as the administrator provides it for them, they will love you, they will use it, and you will have a easier time managing your SharePoint site!
Everyone wins!
To create a master page or reuse an existing master page is a time-consuming process. Because you have to determine what the Office SharePoint Server 2007 page model requires — necessary content placeholders and controls to work with the page layouts.
Another problem of Default.master is that it contains many tables that are difficult to style.
- <%@Master language="C#"%>
...
<HEAD runat="server">
...
<Title ID=onetidTitle>
<asp:ContentPlaceHolder id=PlaceHolderPageTitle runat="server"/>
</Title>
...
</HEAD>
<BODY scroll="yes” ... >
<form runat="server" onsubmit="return _spFormOnSubmitWrapper();">
<WebPartPages:SPWebPartManager id="m" runat="Server"/>
<table class="ms-main" CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH="100%" HEIGHT="100%">
<tr>
<td>
<asp:ContentPlaceHolder id="PlaceHolderGlobalNavigation" runat="server">
<table CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH="100%">
...
</table>
</asp:ContentPlaceHolder>
</td>
</tr>
<tr>
...
</tr>
<tr>
<td id="onetIdTopNavBarContainer" WIDTH=100% class="ms-bannerContainer">
<asp:ContentPlaceHolder id="PlaceHolderTopNavBar" runat="server">
...
</asp:ContentPlaceHolder>
</td>
</tr>
<tr height="100%">
<td>
<table width="100%" height="100%" cellspacing="0" cellpadding="0">
...
</table>
</td>
</tr>
</table>
<asp:ContentPlaceHolder id="PlaceHolderFormDigest" runat="server">
...
</asp:ContentPlaceHolder>
...
</form>
<asp:ContentPlaceHolder id="PlaceHolderUtilityContent" runat="server"/>
<asp:ContentPlaceHolder id="PlaceHolderBodyAreaClass" runat="server"/>
<asp:ContentPlaceHolder id="PlaceHolderTitleAreaClass" runat="server"/>
</BODY>
</HTML>
- Bad example - using default master page
So we recommend using the minimal master page which includes the necessary placeholders.
To create a minimal master page
- Open SharePoint Designer.
- On the File menu, click New, point to SharePoint Content, and then click the Page tab.
- Double-click Master Page to create a new master page.
- Click Design to show the master page in design view. You should see header and left margin areas and several content placeholders in the master page.
- Click Code to show the master page in code view.
- Copy the code from How to: Create a Minimal Master Page into the master page.
- <%@ Master language="C#" %>
...
<html>
<WebPartPages:SPWebPartManager runat="server"/>
<SharePoint:RobotsMetaTag runat="server"/>
<head runat="server">
<asp:ContentPlaceHolder runat="server" id="head">
<title>
<asp:ContentPlaceHolder id="PlaceHolderPageTitle" runat="server" />
</title>
</asp:ContentPlaceHolder>
<Sharepoint:CssLink runat="server"/>
<asp:ContentPlaceHolder id="PlaceHolderAdditionalPageHead" runat="server" />
</head>
<body onload="javascript:_spBodyOnLoadWrapper();">
<form runat="server" onsubmit="return _spFormOnSubmitWrapper();">
<wssuc:Welcome id="explitLogout" runat="server"/>
<PublishingSiteAction:SiteActionMenu runat="server"/>
<PublishingWebControls:AuthoringContainer id="authoringcontrols" runat="server">
<PublishingConsole:Console runat="server" />
</PublishingWebControls:AuthoringContainer>
<asp:ContentPlaceHolder id="PlaceHolderMain" runat="server" />
<asp:Panel visible="false" runat="server">
<asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server"/>
...
</asp:Panel>
</form>
</body>
</html>
- Good example - using minimal master page
- On the File menu, click Save As, provide a unique file name with the .master extension, and then save the file to the master page gallery (/_catalogs/masterpage) in your site collection.
In SharePoint, web configuration includes:
- ASP.NET 3.5 library references – this is necessary for all the ASP.NET AJAX calls
- Add system.web/pages/controls – to add additional tag prefix from System.Web.Extensions
- Add HttpModule (for example – to clean up extra JavaScript from SharePoint)
- SafeControl tags for all custom dlls – in general these can be added via your solution package as well
You should always use a SPConfigModification class to modify your web.config – never tell your user or administrator to make changes manually! This also allows them to switch off a feature from SharePoint knowing that the changes had been reverted.
For developers – you must test your SPConfigModification carefully, mismatched XPath will cause problems in your web.config and create duplicate entries!
You should do anything that helps a project succeed. The best thing is to enable great collaboration, by giving your customer an awesome 'Customer Portal'. Then they can see new mockups, comment on features, get new releases and participate in team discussions on their particular project.
So the first thing you should do is to create a 'Customer Portal' in your SharePoint extranet. Then give your customer a login, send them an email and they are now going to really get involved!
There are many means by which you could provide this functionality to your client.
If you are using SharePoint then....
It is advised that you create a customized SharePoint Team Collaboration site template. That way you can very quickly initialize a new site, for each new customer.
Once you have the template, follow these steps to create a customer portal with SharePoint 2007:
- Go to the root where you want to create a site
eg. sharepoint.ssw.com.au
- Click "Site Actions" on right hand top, select "Manage Content and Structure
-

- Figure: The first step to creating a 'Customer Portal' is to select 'Manage Content and Structure' to view site collection
Once the new window opens, on the left hand side, click on the 'Clients' dropdown select New-> Site.
Note: If you don’t see this option, that means you don’t have permission to create site.
-

- Figure: Create new site
Now follow these steps when the new window opens fill in the fields below.
-

- Figure: Fill in the appropriate info then click "Create"
More Information:
- Fill in the fields for the new client site
eg. Title, Description and URL
- Select the template
e.g “ClientCollaboration_V1” in the Custom tab.
Note: Your selection is confirmed in the picture. In this example the template’s description looks like “Site for Collaboration with SSW Clients”.
- Select “Use Unique permissions” as you need to give the client an account to visit.
- In the “Navigation Inheritance” choose “No” as you don’t need to let client visit the other client sites via the navigation.
- Click “Create”
Next step is to setup the groups and permissions.
Figure: Create a 'new group' or select an 'existing group' for the newly created site.
More Information:
- Permissions: After you created the website for the client project, you need to configure the permission to make sure the developers and the clients can visit the site with the current authority. By default:
- Visitors to the site - Read :
- Visitors need to read most of the site.
- They can't read team discussions (not used)
- They can download from 'release files' document library.
- They can synchronize their calendar to the team calendar in SharePoint (not used - one day it should read from CRM)
- Members of this Site - Contribute:
- Can view, add, update and delete.
- Owners of this Site - Full Control:
In this case, we are using 'create a new group' option because we want this group to be able to access only for this perticular site - It is a good practice to create a new group for every site you create, because it will be easier to add or delete users in the group for that specific site.
Note: you can also access this through the "People and Group" option on "Site Action" link on right hand top of the page, if you need to manage permission in future.
Click "OK", and the portal is created.
-
- Figure: View Northwind portal.
Note: SharePoint will send "welcome email" to all the members of the groups you created for the site with basic information, but you still need to send email to your customer with the login details like Url, userName and Password.
ASP.NET is file system driven, SharePoint is database driven – all SharePoint content and meta data comes from a database, include images, HTML, Master Page, etc. SharePoint provides a framework where components can be plugged in, and out of the box these areas are improved:
- Security model, membership, permissions
- There’s a relatively consistent UI framework
- Menus, navigation and site maps
- Administration of access, site owners can change permissions for that site – without admins
Deployment model is very different:
- ASP.NET has MSI file or XCopy deployment – individual server
- SharePoint deployment is via Solution Package – but goes cross site farms
- Deployment is both declarative in XML format, as well as in code with Feature and Event receivers
Tools:
- ASP.NET is mostly done in Visual Studio .NET
- SharePoint development is split among:
- Internet Explorer – SharePoint configurations (note: non IE browsers remain 2nd level and isn’t as good as IE with SharePoint)
- Microsoft SharePoint Designer – SharePoint HTML page design and customization
- Visual Studio .NET – custom web parts, custom workflows, solution packages
Microsoft SharePoint Technologies is built on top of ASP.NET technologies. In particular, MOSS 2007 is based on ASP.NET 2.0.
This means that there are many skills that an ASP.NET developer already has that can be translated to SharePoint directly.
- Master Pages – SharePoint uses master pages
- Site Map – SharePoint uses the ASP.NET site map provider model and comes with many additional customized site map providers out of the box
- Menu – SharePoint uses ASP.NET menu controls, powered by site maps
- Page Control Lifecycle – the same key fundamental knowledge for ASP.NET is also necessary when making custom SharePoint development
- Web.Config – like ASP.NET – many SharePoint configuration is done in the Web.Config – though SharePoint provides web UI to modify many of these options from Central Administration
- .NET – Your .NET skills are definitely not going to go away
- IIS – Each SharePoint web application is a “Site” in IIS, the site bindings are also identical
Development for a SharePoint solution is always risky and may involve bringing down the server from time to time. So we always customize and develop SharePoint solutions on a separate development server. But when your development is done, do you know how to deploy your changes to the staging and eventually the production server?
The Bad method
The naïve and bad method would be to just back up the entire content database, then copy the database backup to the destination server, and restore it there.
- Backup command:
stsadm –o backup –url http://servername:port -filename c:\myfile.bak
- Restore command:
stsadm –o restore –url http://servername:port –filename c:\myfile.bak -overwrite
There are quite a few issues with this approach:
- At a glance – seems simple
- Any additional content at the destination server is wiped out – no content editing can continue while the development work is happening…
- Backup file can be extremely large as it includes version history and a lot of extra fat, the file can easily be over a few hundred megabytes!
- Deployment via backup and restore is not a Microsoft supported operation
The Good method
The better method is to build a feature or solution deployment package
- Build a VSeWSS project for package and deployment
- When built, this will produce a wsp file (this is a cab file) that can be deployed as features on the destination server
A few considerations for this approach:
- Site definitions, list definitions, layouts and masterpages, static content and webparts can all be deployed this way
- User content cannot be deployed this way. Any content will need to be exported and re-imported to move between development, staging and/or production servers.
CAML is the XML definition for all things in SharePoint, in deployment, and in creating templates, CAML is the only format.
In SharePoint development, you will also need to know CAML, in particular, how to write a query in CAML.
-
Widely used in Content Query Web Parts
-
Also used in SharePoint content reports
-
In code, used by SPSiteDataQuery object
-
<Query> <OrderBy> <FieldRef Name="Modified" Ascending="FALSE"></FieldRef> </OrderBy> <Where> <And> <Neq> <FieldRef Name="Status"></FieldRef> <Value Type="Text">Completed</Value> </Neq> <IsNull> <FieldRef Name="Sent"></FieldRef> </IsNull> </And> </Where> </Query>
- Figure: Example of CAML query
You can see - CAML is essentially the same as SQL WHERE syntax, but wrapped in an XML format.
Problems with CAML:
-
CAML is XML and is case sensitive – including attributes names.
-
<Query> <Where> <Or> <Eq> <FieldRef name="Status" /> <Value Type="Text">Completed</Value> </Eq> <IsNull> <FieldRef Name="Status" /> </IsNull> </Or> </Where> </Query>
- Figure: Example of CAML query
-
SharePoint is not good at telling you if you made a mistake with your CAML query.
- Figure: Debug error message
-
Hard to debug.
Tips: Use 3rd Party tools - U2U CAML Query Builder
- Figure: U2U CAML Query Builder
Note: U2U CAML Builder is the best tool that we have. There are some occasional UI and interface issues, but for creating CAML and testing it against live SharePoint lists it gets the job done. And it’s FREE!
These controls are similar, but the DVWP needs heavier customization and should be avoided where possible.
The CQWP is easier to style. The DVWP should only be used if you need one of these features:
- You only want to search on one column in the list, rather than all the (indexed) columns.
- You want to perform a search on multiple lists, but not all the lists on a web.
- You want to have a very specific Look and Feel that the search results use.
SharePoint comes with some very basic workflows out of the box. A particular example is the content approval workflow.
When a content approval workflow is used, it modifies the process of publishing content to be:
- User clicks publish (click 1)
- Workflow starts, and asks the user to request for approval, there’s an option to add additional messages (click 2)
- The workflow sends an email to the user to tell him an approval workflow has started. (email 1)
- The workflow also sends an email to the approver(s) (email 2)
- The approver receives an email, then returns to the page – they can Approve or Reject the workflow. (click 3)
- Either way, a new workflow screen appears, with an option to add additional messages, the approver clicks accept (click 4)
- The approval workflow completes and publishes the page.
- It then sends an email telling the user that an approval workflow has been completed (email 3).
What is the problem?
The out of the box workflow is extremely generic. It has no customizations or shortcuts. Even if you are an approver, you cannot skip any of the steps. The end result is that you will have to click 4 times and receive 3 emails, for approving your own finalized content.
These kind of workflows are designed generic to fit any business’ needs – and in fact, businesses using these out of the box workflows have to adjust their staff’s workflow to match SharePoint’s ones. Which can be counter intuitive.
We think these SharePoint workflows need to be far more customizable.
SharePoint does not provide support for complex reusable workflows easily - most companies go for a 3rd party solution:
- Figure: 3rd party tool - Blackpearl
- Figure: 3rd party tool - Ninetex
SharePoint utilizes CAML to do a lot of things - one of these is using CAML to define a query language to select elements from lists within SharePoint.
The development experience with CAML is not good. CAML is unforgiving when it comes to errors, but it doesn't tell you what's wrong. Thus earning it a bad name with SharePoint developers. People don't like CAML.
The SharePoint object model is very comprehensive and lets you select items from lists, select lists from sites, in site-collections within web-applications.
Naturally, using the object model is great for traversing all elements in a list. Once you have a handle to the item, you can also easily modify that item.
On the other hand, one of the SharePoint class SPSiteDataQuery allows a developer to use CAML to specify a query condition that SharePoint can understand to search and return matching elements from across the entire site collection.
This is the underlying class that the Content Query Web Part relies on.
So, you need to use object model when you want to:
- Iterate all elements in a list
- Modify elements in a list
And you use CAML, whether in CQWP or in code with SPSiteDataQuery to:
- Select, filter elements from SharePoint lists
- Select elements from multiple lists
SmartPart is basically a simple but genius idea - it is a simple web part that can host a user control (ascx) inside it via the Page.LoadControl method. That way, all you have to do as a SharePoint developer is to write the ascx control, and you can do it with the Visual Studio designer to arrange the user control via drag and drop, and then when you want the web part on a SharePoint page, you load the generic SmartPart, and tell it to load the ascx that you want.
However, there are some PRO's and CON's when you use a SmartPart:
PRO
- Being able to rapidly create the control's layout and then focus on the code behind - in familiar ASP.NET user control style.
CON
- Many users switch to full trust for their User Controls and disregard SharePoint security this is very easy to set up, but very bad practice. The user control dll should be deployed to the GAC.
- Performance is not as good as a web part because a SmartPart is "host" by a page.
- Hard to deploy - this is a major problem for SSW because we use solution package to deploy web parts. The ascx can be deployed manually to wss\VirtualDirectories\, or it can be deployed to the 12 hive via _controlTemplates/ - and then the user control referenced via ~/_layouts/controlTemplates/ but this is not an intended feature of SharePoint deployment.
- Hard to debug - if the ascx is written with src codebehind, then that file is compiled on demand by ASP.NET you can't debug it easily. See xxx (link) on how to debug SharePoint.
Our recommendation:
- Understand the difference between SmartParts and Web Parts - don't use SmartParts just because it's "easy" - there are many issues that will come back and hurt the developer.
- If your control does not work with SharePoint directly, or has a lot of layout elements it is OK to use SmartParts
- Otherwise, write your own Web Part.
When a designer (or a developer) adds design/style files to SharePoint - care must be taken regarding where the files are placed:
- Some places are are not suitable because they are not good for deployment
- Other places may have permission issues - designers can't access them
- Some files are part of the site definition and should not be customized
So our rules are:
- Never modify out of the box SharePoint files in /Style Library/ - those files are part of the site definition, if you customize them they are hard to deploy
- Start with a clean, minimal masterpage
- Create and reference your own CSS files and put them under /Style Library/CSS/<client>/
- You may want to further divide your CSS paths according to the areas of the site that your CSS is designed for:
E.g. /Style Library/CSS/SSW/Clients/layout.css
- Designers can modify the XSL file as well!
put them under /Style Library/XSL Style Sheets/<client>/
As a server product, SharePoint supports lots of configuration, but the support for packaging and deploying changes between servers remains very week.
The experts agree that the best and preferred way to package a set of changes is to build a solution package. A SharePoint solution package includes all the components and dependent files packed in a cab file.
There are many reasons why you need to use solution package:
- All dependent files and components are in the package - allowing developers to quickly deploy development, testing, staging and production servers.
- Manual steps are very long, and error prone
- Solution packages are easy to retract
- Minimize downtime in the SharePoint production server during an upgrade operation
- No content data loss during upgrades - SharePoint backup/restore deployment methods will block users from making changes to the production the site during the upgrade period
In SQL Server you have tables to store data. Then you have Views, Relations and Stored Procedures.
SharePoint gives us Lists where we can store rows and columns of data, but it is not the same as a full database.
- There are no joints out of SharePoint – you can do limited operations with lookup fields but they are not the same as joints in SQL Server
- Views in SharePoint are filters, grouping and sort on a single list only.
- Formula fields in SharePoint are only updated when the row is changed. If you change the lookup value in the lookup list, it will not change any of the items using formula fields that are currently referencing that lookup.
- No stored procedures in SharePoint
Database remains the best at doing database work. SharePoint is OK at creating quick lists and working with simple lists, but it is not a database server.
Do you let your designers loose on your development SharePoint?
This is how we work:
- A designer would imagine and mockup the design using a graphics tool – such as Photoshop
- After the mockups are signed off, we let the designers work on the actual page
- Give them designer permissions to your development site and let them loose with SharePoint designer!
There are many reasons why we believe that designers should work directly in SharePoint, with SharePoint designer:
- In all areas of .NET development, whether it be ASP.NET, WCF or SilverLight, designers are more and more involved with the actual project beyond mockups
- It helps them understand the limitations of SharePoint, which helps their future design to play to its strengths
- They are also better at CSS and DOM than a typical developer, as well as more cross-browser aware
- They are able to make a call on how close a designer can be bent when the implementation is hard or impossible - with developers who can't make that call, they may end up spending a lot of time failing to get the last 2 pixel perfect
- SharePoint designer is sufficiently powerful and offers the only experience currently available for building with SharePoint sites
- SharePoint has built-in check-in and check-out, as well as version controls, publishing and approval controls - all of which are excellent for team development
The major drawback for a designer is the complexity of a SharePoint masterpage:
<insert picture>
Figure: Bad - Nasty looking masterpage
Luckily, we always start with a clean-minimal masterpage, which gives our designers full freedom to implement their vision:
<insert picture>
Figure: Good - clean-minimal masterpage
The Content Editor Web Part is very easy to use in any web part zone, and gives your content editors ability to add additional text and flair to a page.
Figure: Content Editor Web Part – available in any web part zone
However, there is a scary hidden trap!
Figure: Content Editor Web Part looking mostly harmless...
So what’s bad with the Content Editor Web Part?
- The content in a content editor web part is not version controlled.
- If an editor accidentally overwrites a previous copy – there’s no way to go back.
- If an editor accidentally deletes a Content Editor Web Part – the content in it is lost.
- Data loss is always bad – and Content Editor Web Part gives you many different ways you can easily lose data... you need tread carefully and know the risks!
The best practice is:
- Do your content editing in the Content Editor Web Part, or in SharePoint Designer.
- Click the Source Editor button afterwards to get the raw html view.
- Copy and save this to a plain HTML file, and save the file in the page library (which is version controlled).
- In the Content Editor Web Part – link to the HTML page’s URL.
a.If the text is very tiny – may be just a big heading, you may not want to do this.
b.Using Content Link is also another way you can re-use the same text in different web pages and update them in one place – very good for big banners.
Figure: Using Content Link to a file - safely stored in the document library. This gives us the best of both worlds
It is extremely important to make your site standards compliant:
- It makes styling a lot easier.
- It also means your site is likely to work for all browsers, even if you don’t specifically target/support them.
- It requires accessibility for big public sites can be met easier.
When you first run your SharePoint site – you’ll discover that it looks nice on the surface but needs a significant amount of work to fix all the bad HTML.
Implement CSS Friendly – these are the control adapters released by Microsoft to make ASP.NET render better, non-table based controls. You can implement them for SharePoint sites as well.
- <TABLE id=zz1_TopNavigationMenu class="..." border=0 cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD id=zz1_TopNavigationMenun0>
<TABLE class="..." border=0 cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD style="WHITE-SPACE: nowrap">
<A style="..." class="..." href="...">Home</A>
</TD>
</TR>
</TBODY>
</TABLE>
</TD>
...
<TD id=zz1_TopNavigationMenun1>
<TABLE class="..." border=0 cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD style="WHITE-SPACE: nowrap">
<A style="..." class="..." href="...">Operations</A>
</TD>
</TR>
</TBODY>
</TABLE>
</TD>
...
<TD id=zz1_TopNavigationMenun2>
<TABLE class="..." border=0 cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD style="WHITE-SPACE: nowrap">
<A style="..." class="..." href="...">Application Management</A>
</TD>
</TR>
</TBODY>
</TABLE>
</TD>
...
</TR>
</TBODY>
</TABLE>
- Bad example - without using CSS Friendly
- <div class="CssFriendly-Menu-Horizontal" id="zz1_TopNavigationMenu">
<ul class="CssFriendly-Menu">
<li class="CssFriendly-Menu-WithChildren">
<a href="..." class="CssFriendly-Menu-Link TopLevelNavItem">About Us</a>
<div class="cbb CssFriendly-Menu-Dropdown">
<div class="CssFriendly-Menu-Dropdown-ItemHost">
<ul class="first">
<li class="CssFriendly-Menu-Leaf">
<a href="..." class="CssFriendly-Menu-Link">Employees</a>
</li>
</ul>
</div>
</div>
</li>
...
</ul>
</div>
- Good example - using CSS Friendly
You should always try to configure existing out-of-the-box SharePoint webparts before you roll your own.
The Content Query web part in particular is very flexible – allowing contents from different lists to be presented in different ways.
These are some of the fields in the CQWP that are often configured:
MainXslLink, ItemXslLink:
These two controls the main and item XSL file paths. Set these to your new XSL file under /Style Library/XSL Style Sheets/SSW/SSWMainContent.xsl and SSWItem.xsl files
ItemLimit
The default number of items that are displayed on a Content Query web part is 15. With unlimited pages. Sometimes you want this number to be a lot higher (or -1 for no limit).
Note: If you do make this unlimited - make sure your page is designed to grow infinitely or the layout may look strange.
CommonViewFields
The Content Query web part automatically selects a few of the common fields for any query. But sometimes you want a particular field that isn't selected by default. This is when you should use CommonViewFields.
The syntax is "fieldname,fieldtype;"
E.g. PublishingContent,PublishingHTML;
Query and QueryOverride
The Content Query web part gives the user a lot of flexibility to design the query in the UI toolpart. However if your needs are perculiar you can use the QueryOverride to skip over defining the query and use your supplied CAML directly.
-
[Guid("5bbdb385-5076-4a4b-85e8-691664b7f575")] public class WebPart1 : System.Web.UI.WebControls.WebParts.WebPart { public WebPart1() { } protected override void CreateChildControls() { base.CreateChildControls(); // TODO: add custom rendering code here. Label label = new Label(); label.Text = "Hello World"; this.Controls.Add(label); } }
- Bad Example: Inherit from System.Web.UI.WebControls.WebParts.WebPart
-
public class RelatedContentByQueryWebPart:CustomContentByQueryWebPart { public string RulesKeyWords //get the column name from SharePoint { get; set; } protected override void OverrideQuery() { StringBuilder query = new StringBuilder(); SPListItem item = SPContext.Current.ListItem; string[] rulesKeyWords = {}; if (item != null) { ...... } this.QueryOverride = query.ToString(); // pass the query } }
- Good Example: Inherit from CustomContentByQueryWebPart
You have data in CRM 2011, so how do you see it in SharePoint? The data that is stored in CRM entities should be available in SharePoint so users can find and use the data in areas such as:
- SharePoint search
- SharePoint reporting (if you are using SQL Reporting Services in integrated mode)
There are many ways to get to this data, let's go through them: You have data in CRM 2011, so how do you see it in SharePoint? The data that is stored in CRM entities should be available in SharePoint so users can find and use the data in areas such as:
- SharePoint search
- SharePoint reporting (if you are using SQL Reporting Services in integrated mode)
There are many ways to get to this data, let's go through them:
Option 1: SQL Server Filtered Views
CRM recommends that you *don't* read from the Tables, so they provide SQL Views for this purpose.
Summary: SharePoint BCS -> CRM database
Pros |
Cons |
Easiest
Best performance
Codeless
|
Read-only
Not available for hosted CRM
Security issues as you are exposing the view.
|
Filtered Views in Microsoft CRM provide access to the data available that supports providing picklist name and id values (lookup tables).
More information:
If you only want read-only for CRM on-premises data for SharePoint users, this solution is fine. You create the External Content Type directly against the Filtered Views in the CRM database.
http://msdn.microsoft.com/en-us/library/gg328467.aspx

Figure: The result of “SELECT * FROM FilteredCtx_Project”. Use Office SharePoint Designer to hook this up.
OPTION 2: Web Services
CRM provides web services.
Summary: SharePoint BCS -> Code calling CRM web services - > CRM database
Pros |
Cons |
Read/Write
|
Needs lots of code and test work.
Needs to be deployed and published to the web server.
Less performance than SQL filter views directly #1
|
#1 Note: Performance could be improved by making the reads from the views and the writes through the web service
More information:
1. Use BCS in VS 2010
2. Write code that calls the CRM web services (that access the CRM data)
3. Test
4. Deploy
OPTION 3: Expose OData from CRM as RSS
The CRM 2011 OData Query Designer can be used to build queries to expose the data from CRM as RSS
Pros |
Cons |
Easy configuration
|
50 records limit. Need to page through the results.
Possible issues with firewalls and proxies because it uses Integrated Security for authentication.
Read-Only
No easy way to consume
|
Note: You can really only call the OData endpoint from an application that already has an authentication cookie with the CRM server. i.e. you can't impersonate and call it like you can the standard WCF endpoints So it is really only suited to calling from Silverlight and JavaScript web resources that are delivered inside CRM (because they have the cookie)
More information:
The first step is to expose the data:
1. Install http://crm2011odatatool.codeplex.com
2. Make a query

Figure: Designing a query
3. See the data

Figure: See the data - RSS source for xtc_countrySet
The second step (and the problem) is consuming the data

Figure: BCS has no option to consume RSS data. Please Microsoft SharePoint Team, we need a new 'Data Source Type' = OData
In summary, CRM 2011 can exposes OData, but SharePoint 2010 BCS doesn't consume OData.
The 3 options to consume the OData/RSS data:
· Consume the OData by SQL Server, via TSQL ??? Then use BCS to call SQL Server. Summary: SharePoint BCS -> DataSourceType: SQL Server -> OData- > CRM database
You would need to be crazy to go down this route http://www.vishalseth.com/post/2009/12/22/Call-a-webservice-from-TSQL-(Stored-Procedure)-using-MSXML.aspx
· Consume the OData by a BCS adapter + code calling web services (same story as above). Summary: SharePoint BCS -> code calling OData- > CRM database
· Consume the RSS by "SharePoint RSS view web part" directly. Summary: SharePoint RSS view web part -> OData- > CRM database (not recommended as it could not be used in "SharePoint Search")
So OData is all things horrible because it is hard to eat :-(
OPTION 4: BizTalk
Biztalk is built for mapping systems together, unfortunately this solution is only considered for large enterprises.
Summary: SharePoint BCS -> BizTalk Database - > CRM database
Pros |
Cons |
Read/Write
The BizTalk data centre can also provide data for any system.
Requires little code if users already have BizTalk
|
BizTalk :-)
Deployment - Needs external work to deploy BizTalk server.
Licence Cost
|
OPTION 5: SharePoint BCS Adapter (provided by the CRM Team) RECOMMENDED
This BCS Adapter for CRM 2011 is from the CRM team (It does all of the BCS work for you by interrogating the CRM metadata service).
Summary: SharePoint BCS -> Pre-built Adapter (.NET Assembly) -> CRM web services - > CRM database
Pros |
Cons |
Read/Write
Minimal coding
Easiest to implement
The likely way forward (Best Practice as Microsoft)
|
Needs to be deployed and published to the web server.
Less performance than SQL filter views directly
Only recently released.
|
Figure: CRM data available in SharePoint
More information:
Download from Microsoft
Read "Connecting to CRM Online 2011 with SharePoint 2010 Business Connectivity Services"
Run tool to generate the XML mapping (.BDCM)
This solution uses a BCS Connector – a .NET Assembly responsible for mapping external data into a form usable by SharePoint. This component is loaded and hosted within SharePoint 2010, and communicates with CRM via the CRM Proxy Service.
Option 6: OData 3rd Party solutions (doesn't exist)
Today SharePoint 2010 exposes lists and document libraries as OData, but does not natively consume OData.
What does this mean?
- CRM 2011 exposes it data as OData, but cannot consume OData
- SharePoint 2010 exposes it data as OData, but cannot consume OData
....and there are no 3rd party solutions to solve this... We use SSWPackage.exe
The long answer:
Deploying changes between development, staging and production servers can be a very interesting exercise:
- It is painstakingly awkward when you realize that you have forgotten a file
- Or forgotten to take the latest version of a particular file
- Each iteration is manual and can be error prone
- The result is that your developers are working late into the evening and your SharePoint servers are down for a prolonged period of time – something that may be very difficult to accept in a corporate environment
At SSW, we saw all this was unacceptable and work to improve this process.
Our answer to the deployment problem is a combination of tools and processes – we call it the SSWpackage.exe
- Multiple development virtual machine environments
- Test repeated deployment to staging before you actually deploy to the production server
- SSW SharePoint Deployment Auditor – compares development, staging and production servers to identify missing files that needs to be deployed
- Specify ignore lists
- Spits out XML code that would be easy to add to your package xml
- SSW Package Updater – updates the solution package based on the XML definitions
- Ensure you always have the latest version of the files from development SharePoint included in your package.
- Microsoft Visual Studio extensions for Windows SharePoint Services
- Using the latest VSeWSS 1.3 CTP
- Generates the package and batch files
- SharePoint STSADM tool for deployment
Into the future of SSWPackage.exe
- Fully continuous integration with SharePoint
- More SharePoint validation functions
- Improved versioning control
- A great GUI to bring it all together
- SharePoint designer can silently reformat your code and introduce errors.
- If you modify any master page or page layout file with SharePoint designer, it becomes customized. This means that SharePoint is now looking at a customized version stored in the database rather than the version on the file system. You then can't deploy future changes, because SharePoint will now always serve the customized version instead of the ghosted version in the solution package.
- When working on packaging SharePoint artefacts into Features & Solutions, you should always make small incremental changes to your VSeWSS projects. Each time you should build & deploy to check you haven't broken anything.
- You should regularly make labels in TFS so you can quickly compare your changes against previous working versions to identify problems.
Bad Example:
Good Example:
Each time you deploy a new package to your SharePoint site, you should add a new entry in the version list.
This will enable you to quickly find out which version of the package your SharePoint site is using, and let users know what version they are running.
- A custom list for Version should be created at the root level of a SharePoint site collection, and each time a package is deployed - a new record should be added to this version list.
- A simple blank page with a Content Query Web Part can display this versions list in a friendly manner.
- We do not change the version numbers in the .NET Assembly because the assemblies have to be strong-name signed and deployed to the GAC. So having a versions list is crucial in working out what version of your package is deployed on which server.
We love SharePoint designer and use it everyday.
But there are things that it doesn't do naturally, or it does really badly. Here are some tips on using SharePoint designer well.
- Don't use inline CSS - this goes for any website.
- Always put <div class="..."> wrappers around SharePoint controls. This allows us to define styles for SharePoint controls. It is possible to use CssClass like ASP.NET, but then we lose control to SharePoint regarding how that control will be rendered. Also, some SharePoint controls will eat up your CssClass and not render anything.
- Naming convention for control id! Don't get lazy.
- Turn off Auto indent. Otherwise SharePoint designer will keep modifying your file whenever it saves the HTML - this will make you very upset.
A site column is created on a site level and visible to all lists and content types within that site (and subsites).
You should always try to use Site Columns instead of List Columns
- New in WSS v3 (SharePoint 2007)
- The same column can be added to different Content Types, lists, list templates
- Allows you to make modifications at one place and SharePoint can apply the changes for you across the different lists and content types (doesn't try to fix the content for you though)
- More visibility of the customization we are applying to the SharePoint website
- Make sure the site column is added to our own group description such as "SSW Columns" - this is important for filtering and exporting site column customizations for deployment. Also great because they are now grouped in the UI.
- Figure: Create column - Bad Example
- Figure: Add from existing site columns - Good Example
- Figure: Site Columns - Good Example
Sometimes you still may want to use a List Column.
- You are Mary and want to create a simple list to track supplies, but you do not have site permissions to create site columns
A Favicon is a small image file included on nearly all professional developed sites. When a browser hits your web site and a user bookmarks that site then the favicon.ico graphic will be displayed in the browser’s URL/address line upon subsequent visits to that site.
|
<head runat="server">
<meta name="GENERATOR" content="Microsoft SharePoint">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--Placeholder for additional overrides-->
<asp:ContentPlaceHolder ID="PlaceHolderAdditionalPageHead" runat="server" />
<link rel="shortcut icon" href="~/Style Library/Images/SSW/Rules/ssw.ico" type="image/x-icon" />
</head>
Figure: One line of HTML lets you add your company's icon to your web page
|
See our SSW Rules to Better Websites - Graphics - Where do you store your favicon.ico file?
When you want a Grid with filters, group by, totals and sorting, how do you do this (if all the data is in a list) ?
There are 6 options:
- Option 1 - use data view web part + AJAX (on test server, then export web part, and import to production)
- Option 2 - use content query web part (but no paging, no grouping, no totals)
- Option 3 - install Telerik grid and do aspx page
- Option 4 - using RS + iFrame
- Option 5 - use a smart web part with Telerik
- Option 6 - look for ready to go web part from Infragistics or Telerik that use their grid
if you need to use the object model (like PublishedBy.aspx) to interate through records - use Option 1,3,5 , and we prefer option 5.
if you need to bind a simple list - use Option 4 (best designer, scheduling included, parameters are easy... we know that iFrame is not great).
In SharePoint development, it is always a good practice to use LINQ, instead of CAML.
Why CAML is bad?
- New language skills required for .NET developers
- No IntelliSense or strongly typed objects
Why LINQ is good?
- No new language skills required
- Easier to read and write
- SPMetal is awesome for generating entity classes
- In the backend, LINQ provider translates as much as it can to CAML first
SPQueryquery = newSPQuery();
query.Query= String.Format(“
<Where>
<And>
<Contains><FieldRefName=‘Tags’ /><ValueType=‘Text’>{0}</Value></Contains>
<IsNotNull><FieldRefName=‘URL’ /></IsNotNull>
</And>
</Where>
<OrderBy>
<FieldRefName=‘PostedOn’ Ascending=‘TRUE’ />
</OrderBy>”, _filter);
SPListItemCollectionlistItemsColl= resourceList.GetItems(query);
Figure: Bad example – using CAML Var resourceListItems =
From SPListItem item in resourceList.Items
Where item.Tags.ToString().ToLower().Contains(_filter)
&& item.URL.ToString().Length> 0
OrderBy item.PostedOn Ascending Figure: Good example – using LINQ
In MOSS 2007, to run a public internet site on SharePoint included many hidden costs that soon accumulate to a big number that puts it out of the reach of most small and medium companies.
As a rough calculation - it costs over $160k to run 3 MOSS servers with internet license for internet sites. As much as people loved the features of MOSS for publishing sites - this was a major drawback.
Microsoft recognised this problem, and in SharePoint 2010 line up, they added an additional "SharePoint 2010 for Internet Sites" licenses for standard and enterpise features.
Microsoft has yet to release pricings for SharePoint 2010 - but we can expect the internet sites for standard SharePoint Server to be highly comparable.
class CreateShoppingListHandler : SPItemEventReceiver
{
public override void ItemAdding(SPItemEventProperties properties)
{
float price = 0;
float cost = 0;
if(float.TryParse(properties.ListItem.Fields["Price"].ToString(), out price) && float.TryParse(properties.ListItem.Fields["Cost"].ToString(), out cost))
{
if(price < cost)
{
properties.ErrorMessage = "The cost must not be less than the price";
properties.Cancel = true;
}
}
}
}
Bad example: using custom code – creating a
custom event receiver on the item (the item adding event or item updating
event)

Good example: using no code – just using the
field validation on a list
A demo of this from Andrew Connell on
http://channel9.msdn.com/learn/courses/SharePoint2010Developer/ListsAndSchemas/FieldandListItemValidation/
Developing in ASP.NET is easy, you just press F5, Visual Studio spins up instance of the Cassini web server, and you can see your work execute. Developing in SharePoint is much harder as you need access to a local SharePoint server to see your work run.
In SharePoint 2007 there are three options, in SharePoint 2010 they have added one more.
Figure: Setting up the development environment in SharePoint can give you a headache
Your development choices in SharePoint 2007 are:
- Remote to a shared SharePoint development server
Tip: This is best for people who do *not* need to have their own SharePoint server, such as designers, testers or content editors.
Problem #1: By default you only get 2 concurrent accounts
Problem #2: IISRESET clobbers other users.
- Run your own local virtual machine (VM)
Tip #1: Use an external drive to make it faster
Tip #2: Use SSD to go even faster :)
- Use ‘Boot’ to VHD (Recommended - most trouble but best performance)
Note: Only if you have Windows 7 as the host
See: Less Virtual, More Machine - Windows 7 and the magic of Boot to VHD
One of the biggest problem is that SharePoint 2007 can only be installed on Windows Server and most developer machines do not run Windows Server as the host OS. Tweaks to install SharePoint to Vista were available, but considered risky – since your development environment does not fully reflect the production server.
In SharePoint 2010 – the scenery has changed a little. These are all your options now:
- Remote to a shared SharePoint development server
Tip: This is best for people who do *not* need to have their own SharePoint server, such as designers, testers or content editors.
Problem #1: By default you only get 2 concurrent accounts
Problem #2: IISRESET clobbers other users.
- Run your own local virtual machine (Not recommended – because SharePoint 2010 is 64-bit only)
Tip #1: Use an external drive to make it faster
Tip #2: Use SSD to go even faster :)
Tip #3: The 64-bit requirement means, you can’t use Virtual PC, and so you have to use either Hyper-V (which requires a Windows Server host), or VMWare
Tip #4: The 64-bit requirement means, your host must be x64 to run the virtual machines in x64
- Use ‘Boot’ to VHD (Recommended)
Note: Only if you have Windows 7 as the host
See: Less Virtual, More Machine - Windows 7 and the magic of Boot to VHD
- Install SharePoint 2010 on your Windows 7 PC (Not Recommended)
You are not fully representing the production server
Are there any shortcuts for Silverlight developers (for SharePoint consumption)?
- Yes, you can easily deploy a xap file to a document library. However, if you need to debug it you will need the SharePoint 2010 object model.
Tip: You could minimise your exposure to the object model by using a Repository pattern, which would allow you to debug and test your application without SharePoint, but ultimately you will need to debug and test in SharePoint.
Figure: The Ultimate solution for SharePoint development environments is to have another machine under your desk. The Ultimate Solution
- Get yourself a second machine (same as remote)
- But don’t share it with anyone else!
In SharePoint 2010, there are quite a few tools that we can use to take SharePoint data offline. Let’s look at our options:
- use Outlook to synchronize document libraries, calendar and contacts offline.
- use Excel to take read-only copies of list data offline.
- use Access to take list data offline – Access also lets you edit offline and synchronize back.
- use SharePoint Workspace (this was Groove) to take entire Site offline, unfortunately this doesn’t work for calendars.
We think the best way is to use Workspace instead of Outlook:
- SharePoint Workspace synchronize an entire site
a. So when lists are renamed it knows about it.
b. It also knows about new lists that are added to a SharePoint site Figure: SharePoint Workspace synchronizing an entire site
- Outlook can be quite busy when synchronizing to Exchange server; it is good to not burden it with more work.
While SharePoint Workspace is quite good, we don’t like to store lists in it:
- Access has better filtering, sorting options when offline
In SharePoint 2007, we have Business Data Catalog to connect SharePoint to other line of business applications.
When you connect your other systems to SharePoint you can then have one central place to see your data:
-
Microsoft CRM connected to SharePoint allows you to search for CRM contacts from SharePoint
- TFS connected to SharePoint lets you see the project documents and reports via SharePoint
- Your roster system connected to SharePoint allows you to see those calendars in SharePoint
In SharePoint 2010 – the Business Data Catalog is upgraded to the new Business Data Connectivity Service (BCS).
-
It is a lot easier to plug-in
- Supports not just READ operations, but delete, update and create operations as well.
Any configuration settings, that you rely upon, must have a check so you get an email as soon as the problem arises. Eg.
An anonymous access check - A web publishing site needs a check to make sure anonymous access is configured correctly.
Figure: Enable anonymous access for publishing site
Figure: monitors for anonymous access - If the monitor is down, there will be an email sending out to our network admins
We are always disappointed when adding version information to a Word document. When you use the Work version you get a number that indicates the number of times the document has been saved and not a proper version number.
It is possible to get the number into Word for the version of the document on the SharePoint document library.
Follow the guide here: http://www.bryansgeekspeak.com/2009/03/moss-2007-show-sharepoint-version.html
Note: This also works in SharePoint 2010 and Office 2010. Figure: Good example, you see the formatted SharePoint version number.
Each SharePoint packages contains features that can be targetted at various scopes.
You need to pay special attention when you are targetting the Web Application scope.
The feature XML looks like this.
<Feature Id="{GUID}" Title="WebApplicationConfiguration" Scope="WebApplication" Version="1.0.0.0" Hidden="FALSE" DefaultResourceFile="core" xmlns="http://schemas.microsoft.com/sharepoint/" >
<ElementManifests />
</Feature>
But there is a problem...
The problem with this web application feature is that it will activate by default on All new Web Applications created on that farm, regardless of what the web application or root site template is.
The best practice is to make sure you use the additional attribute ActivateOnDefault and set it to False. Then SharePoint administrators can choose to activate the feature after a new web application is created.
<Feature Id="{GUID}" Title="WebApplicationConfiguration" Scope="WebApplication" Version="1.0.0.0" Hidden="FALSE" DefaultResourceFile="core" xmlns="http://schemas.microsoft.com/sharepoint/"
ActivateOnDefault="False">
<ElementManifests />
</Feature>
If you want an easy way to access data in remote or legacy systems, provide one or more of the CRUD operations to the end users and search the data within the SharePoint search framework, then you should consider BCS. You can also use MS Office applications to access the data from SharePoint.
However, BCS doesn't do everything. It does not provide support for WorkFlow or EventReceivers on the list in SharePoint.
BCS is good for synchronising the data at SharePoint with one other system. It is not suitable for publishing the data to multiple systems (i.e. syndication). If you need to implement syndication, use a standard SharePoint List and attach either a Workflow or an EventReceiver to handle sending updates to the end systems instead.
Use BCS with multiple systems(not working)
Use BCS with one system at time
If you are planning to use Workflow, use Workflow with SharePoint List instead of BCS. Because Workflow cannot be associated directly with external lists. The reason is data is not stored in SharePoint, so the Workflow cannot be notified when items change.
BCS doesn't have WorkFlow support
Use WorkFlow with SharePoint List
A recent Security Hotfix has broken SharePoint WSS3 stand-alone installations. This has prompted Microsoft SharePoint team to quickly release information regarding how to fix the issue.
http://blogs.msdn.com/b/sharepoint/archive/2010/06/22/installing-kb938444.aspx
This again reminds us that it is always not a good idea to have Windows Update automatically updating your servers. There are a few reasons.
- The previously mentioned problem - where the hotfix could bring down a production environment.
- In fact, even in a development environment this could be hours of lost work as the development team struggles to understand why only some of the developers' SharePoint magically and mysteriously broke overnight.
- Windows Update could restart your server, or put your server in a state where it requires restarting - preventing any urgent MSI installs without bringing down the server.
Windows Update remains the best thing for end-users to protect their systems. But in a server, especially a production server environment - Windows Update patches are just like any new versions of the software that's built internally. It should be tested and then deployed in a controlled manner.
So recommendations:
- Windows Updates may be critical and should be kept relatively up to date.
- Have a plan where your awesome Network Admins schedule time to keep the servers up to date - including testing that the servers still perform its functions.
- Turn off Automatic Windows Update on Windows Servers
Figure: Bad example - using the default Date Format
Figure: Good example - using the Date Format with 'ddd'
How do you do this ?
Among other things it means never sending attachments in an email. Once an attachment is included in an email there are multiple copies of that attachment. If people change the contents of the attachment there is confusion about who holds the "master version" of that file.
SharePoint changes this by allowing you to easily email a link to a SharePoint file. This means all recipients review and edit the single "master version" of the file.
Figure: Good example: Email a link, not a file
SharePoint 2010 and Office 2010 ships with a fantastic document management feature "Managed Metadata Service". This new service provides first class support for enterprise taxonomy within a standard SharePoint 2010 environment.
Unfortunately, Office 2007 and Office 2003 can't work with managed metadata fields out of the box.
Office 2010:
- Works fine
Office 2007:
- Document information can't display managed metadata
- You can still save documents to SharePoint
- But you can't check-in (if metadata fields are required)
- User needs to perform a web check-in
Office 2003:
- Can't create new or Open documents with managed metadata
- Install Office 2007 document support upgrade, this bring the experience a bit better similar to Office 2007.
See more:
https://www.nothingbutsharepoint.com/sites/devwiki/articles/Pages/Managed-Metadata-Columns-in-Office-2007.aspx
Best Solution:
Use a 3rd party solution - the best one being OnePlaceMail which provides a UI for managed metadata via the "Save to SharePoint". Works with all three versions of Office so users get a consistent UI.

Figure: The optional save dialog that pops up when saving document to SharePoint - allowing use of Managed Metadata from Office 2003, 2007 and File Explorer
My Site and My Profile are great but if you are not using them, it makes sense to remove them:
Figure: Links need to be hidden
You can follow below steps to hide “My Site” and “My Profile”,
There are a few options, based on what you need to do:
- Delete the association (not recommended)
a. Go to Central Admin
| Application Management | Service Applications
| Configure service application associations,
Choose “default” link:
Figure: Choose “default” link
b.Uncheck the “User Profile Service Application” in the
opened page, then click “OK”:

Figure: uncheck the association for user
profile service
- Customize permissions for only some people to have access to create personal site
You can remove it for most people - but leave it for only some users.
a.
Go to Central Admin | Application Management
| Service Applications | Manage service applications,
Click the link of “User Profile Service Application”, navigate to its manage
page:
Figure: “User Profile
Service Application” manage page
b. Click
People | Manage User Permissions, you can
customize the user profile permission for specific users:
Figure: Better - customize User profile
permission
- Delete the service (recommended if you don't need the service at all in your farm)
Note: You can always create it later if you need it in the
future.
Go to Central Admin | Application Management |
Service Applications | Manage service applications,
Select “User Profile Service Application”, then click the
“Delete” button on the ribbon:
Figure: Best - delete user profile
service
Note:
Later on if you want to get My Site working read these 2 links… unless Microsoft
creates a services that fixes User Profile Synchronization service…. thanks to
Mark Rhodes for these tips…
http://www.harbar.net/articles/sp2010ups2.aspx
and
http://www.harbar.net/articles/sp2010ups.aspx
When SharePoint encounters a new person, it takes people's display name and account name from Active Directory, but sometimes
Figure: Mixed up names - some are good Display Name, some are essentially just the Account Name (More here)
The easiest way to fix this requires someone with central administration access:
- Go to: SharePoint Central Administration | Application Management | Service Applications | Manage Service applications

- Go to User Profile Service Application
- Go to Manage User Profiles
- Find the user profile that you want to update

- Fix the Name field (Display name)
- Save
Better way
The better way is to set up User Profile Synchronization and have SharePoint communicate with Active Directory on a schedule and keep user's profile information up to date. Unfortunately, it can be tricky to set this up in SharePoint 2010.
Technical
When a user is entered (or using) a SharePoint site, the site will first check with Central Admin (the farm) to enquire about this user's profile details. The farm grabs the account name and display name from Active Directory, but does not keep this synchronized.
Unless configured otherwise, end users in SharePoint do not have the ability to modify their own display name. And the best place to update this is to either:
- Modify the farm user information list cache (via steps above), or
- Set up User Profile Synchronization
Follow the step to fix SharePoint JavaScript errors:
- Your content editor is trying to change page layout via the Ribbon in SharePoint 2010
Figure: Click Page Layout in the Ribbon
- But they get a JavaScript error
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3)
Timestamp: Wed, 22 Dec 2010 01:33:17 UTC
Message: Object required
Line: 2
Char: 6422
Code: 0
URI:http://intranet.ssw.com.au/_layouts/cui.js?rev=wvoVpqlQb30nGo4DjDk8Kg%3D%3D
This error is likely caused by SharePoint trying to render available page layouts for the page to switch to, but there is an error.
A very quick fix that can be applied by a site owner is:
- Site Settings | Look and Feel | Page layouts and site templates
- Restrict the valid number of page layouts that can be used, instead of allowing "Pages in this site can use any layout"
Figure: Restrict valid page layouts
- This fixes the Ribbon menu
Figure: Ribbon menu fixed!
- Tell your sys admin that there are broken packages in SharePoint and must be fixed ASAP
When editing a .doc file in a SharePoint document library, you need to always “check Out” when you see “Read Only”. You need to “Check In” the document after editing to TFS.
Figure: Warning - If you see “Read-Only” in the title bar, then you need to “Check Out”
|