Posterous theme by Cory Watilo

Feedback from the few sessions I attended at Sharepoint Saturday UK, 12th Nov 2011

As Giles Hamson mentioned I too went to the "Sharepoint Saturday" meet-up in Nottingham for the first time. Since I was on a course this week and driving 3 hours every day I didn't get much chance to give my feedback, so with a lot of delay here are my personal notes I jotted down in my memory.

To my surprise, or just because I didn't actually read the Sharepoint Saturday website much when I registered, I was amazed by the venue, the quality of the speakers (a lot US citizens Sharepoint faces coming just for the occasion) and the attendance. I thought not many professionals would sacrifice a Saturday to come and "think Sharepoint" since I know I was in that case last year but indeed it was quite a success, not a full room in the opening keynote but still a good number, a few bloggers have already reported about the event and a lot of noise on Twitter too, so this one is extra. 

To my experience for having attended 2 Sharepoint Best-Practice conferences in London, once as a guest and once as a vendor, Sharepoint Saturday is very similar except that it's free !

The quantity of knowledge session after session is very intense and if we had a way of attending 2 rooms at the same time it would be quite useful, like a download of information into our brain. Actually there kind of is a way to attend 2 sessions in 1... if you read the Twitter post of next room while listening to your room, but it is quite tiring.

The other point of such event is purely to take the opportunity of networking with the Sharepoint community in the UK and internationally, it's rare to have people involved into Sharepoint, the ones who blog and write books under the same roof.
The reality is that meeting this close-knit Sharepoint community in real life in just one day does not give much time but it helps to put a face and personality behind a name or nickname when engaging each other on twitter and reading blogs.

Right, so now for the content and what I gathered from that day: 

9:15. Silverlight vs. html5: Becky Isserman

This session was a demo of how to create a very basic project in Silverlight and the same in HTML5, but it was really a discussion with Becky and the attendees about the feeling around chosing either platform for development. The conclusion was a BIG "no idea", "we don't know" "Microsoft didn't tell us anything". So not very useful except to confirm our feeling of uncertainty.

Note to self :

10:20. Customizing the SharePoint Packaging and Deployment Process in Visual Studio 2010: Eric Schupps

I am not a Visual Studio developer since I usually design an application, write my views on what a webparts, event handler or piece of custom-code should do, then the developer would write the managed code and deliver me the packaged solutions to deploy on a Sharepoint environment. However I occasionally have to organise the solutions, re-factor a bit of code or add comments and re-compile and I recently also had to write a few SSRS reports in VS Business Intelligence therefore I needed to make sure I was in sync with other's Sharepoint professionals' way of packaging Sharepoint solutions.

  • CKS.DEV

One main thing I did not know for not having developed in VS recently and will now add it to priority number 1 when opening Visual Studio 2010 on Sharepoint: install CKSDev, this will add additional tools for SharePoint into your Visual Studio. For instance a very useful Project Item is "Branding" which create master page, CSS and layout page, which will all be activated as a feature when deployed:

[IMAGE HERE]

 

 

  • What changed in deploying Solution to Sharepoint?

A must have as well is Powertool for 2010 to get additional tools for SharePoint. 

Production deployment has not changed: give a WSP and deploy it via Powershell (or stsadm)

Development deployment has changed dramatically, to take advantage of sandboxed solution we can deploy directly Visual Studio to Sharepoint.

Pay attention at the option "view deployment configuration" in Visual Studio solution properties which allows us to configure all the steps that to be done at deployment time.

11:45. How we did it (about branding ) : Matt Hughes

  • Download a custom masterpage and CSS from the community, some include comments and disable some feature by default which is useful for starting small and re-enabling features as needed.
    example : http://freespmp.codeplex.com by Matt, or http://startermasterpages.codeplex.com by Randy Drisgill
  • One CSS class to note that I didn't use : "S2-notdlg" anything within this class will not show in a Sharepoint modal dialog box, to use if we have a control to show everywhere but not duplicate its display in the dialog boxes.

Matt' session was really interesting as a subject but I didn't learn much except that it confirmed my experience in doing Sharepoint branding as he and Sam have had the same issues I had.  

It was a little bit strange to focus on Matt's face whiel he spoke, check the pic below, Movember Sharepoint style.

1

13:45. Why are we developing?  : Nigel Price

I chose this session to check what others are doing Out-Of-The-Box in Sharpeoint as opposed to building custom controls and webparts to reach business expectations. This is a rather vast subject because more often than not, my clients come to me and think that Sharepoint can do everything they want without the help of .net developers. The other side of the balance is that being a Sharepoint consultant I need to make sure that sites I design are not too far from Sharepoint architecture so that they will migrate easily and "anyone" (ie not developer) can maintain them, bringing a lot of out-of-the-box tools.

Again I mainy conforted what I usually do which is "Try OOB before going for managed code", Nigel's bullet list for "when do we have to develop" is : 

 

  • Need to action something with elevated privileges 
  • Use of an authentication mechanism outside AD 
  • LOB integration (BCS..)
  • Write event receivers 
  • Custom Search protocol (if custom iFilter) 
  • Code repository, i.e. source versioning 

 

15:00.  Why branding intranet ? Gus Fraser

(SharePoint 2010 Intranet Branding for Developers)

As we all know the main reason for branding an intranet site is so that it doesn't look like SharePoint. This has been the subject of lots of discussion in the past weeks and surely will not end. Although my role is to advise my client in the concept of branding Sharepoint and why they should not remove all "Sharepoint-looking" features very often I just have to follow what the client's creative agency (who never used Sharepoint) dictates.

Notes:

  • Use prototyping tool like Balsamic more. specially that Balsamic includes "mockups to go" ribbons. 

  • Again : use Visual Studio 2010 CKSDev which includes branding item. 
  • Use control adapters.
  • Use CSSReset by Kyle Schaeffer, which is a CSS to literally "reset" the existing style in Sharepoint 2010 so that we can start styling them as we want.
  • Use ieTester tool to test your site with various IE versions
  • Options in the Sharepoint Ribbon barre can be removed using Custom Action. Gus' code to remove the font style option for instance can be downloaded here
  • Other link about branding in the pic below

2

Conclusion
As mentioned a the top of this post, this Sharepoint Saturday did not feel like wasting a day of my private week-end time, the amount of knowledge in the sessions AND talking to the other Sharepoint at the breaks is invaluable, it did feel like a long way to go for just one day and I had to be back in London for 8pm which made me leave just at 5 after waiting to see if I win an iPad2 ;-) I will definately go back to this event, and since I missed the Sharepoint Best Practice (now International Sharepoint Conference) in London this year I am very eager not to miss the next one so that I can renew this experience multiplied by 3 days.

 

Run SPD2010 workflows with impersonated permission

Today one of my users reported that “something is not happening as supposed to” on a site, which most IT professional would say is quite a typical call we receive…

 

ISSUE:

After a quick test I realised that a workflow meant to start on item submission of an InfoPath form was failing to complete and the workflow status would show “CANCELLED” (very misleading as nobody actually “cancel” that workflow… and this message “The workflow could not update the item, possibly because one or more columns for the item require a different type of information.”

 

CAUSE:

Basically the user’s permissions had changed on the site so that he could not anymore update items in the library but the site owner didn’t realise the knock-on effect this would have on existing workflows as well, especially if the workflow is meant to go search for other items in the library and update them. The user not authorised to edit them will fail the workflow.

SOLUTION:

Short Google on “SharePoint Designer workflow elevated permissions” and I was reminded by this blog article http://is.gd/RdjmWH  about impersonation in SPD 2010 Workflows (and not elevated as mentioned) which was new from SPD 2007.

But not any kind of permission, since it will the logged in user on SharePoint Designer so bear that in mind when releasing to Production environment.

 

STEPS

Make sure you are logged in SharePoint Designer with the correct user (one that will not disappear once you finish your development) – note: use the little “change user” icon on the bottom  left corner of SPD2010

Image003
 to change user.

-          Edit your workflow

-          Within the steps of the workflow that require to be impersonated with your user insert an “Impersonation Step” by just typing the label

Image001

-          Move all required steps into it (using Move Up or Down)

Image002

-          Publish your workflow

-          Test with the access level of your user

 

Et voila !

 

Note: This short blog article is my first attempt to participate to my colleague Giles‘ blog http://ghamson.wordpress.com as an author and therefore you may also see it on my other blog.

Update Infopath connection file automatically when deploying to new environment

Discussing with some colleagues a few weeks ago we were not sure to like the Data connections in InfoPath because the issue is when we move the InfoPath form to a new server, this data connection cannot be edited to point to the new server (greyed out below, can’t edit it).

Image002

Last week I managed to deploy the same form to a totally different server without having to recreate the data connection and this week I found out how I did it (yes sometimes you get thing the other way !)

SOLUTION :

Re-publish the form to the new server but before clicking the last step of the Wizard make sure you tick the box “Adjust data connections to the new location”.

Image001

Don’t miss this chance !  If you miss this tick box it will not offer it to you a second time as InfoPath think you always wanted to publish the form to server http://server1 and use data connection to http://server2 .

Voila !

So we can like Data Connection file saved on SharePoint data connection libraries again !

Francois

Content database not associated with site collection after restoring its content

I came across a strange behaviour while doing some SharePoint 2010 database administration last Monday and didn’t find an exact equivalent on the internet, two of my colleagues retried the steps and were as puzzled as I was, let’s see if someone else experienced the same issue, and I am sharing how I fixed the problem.
 
TASK
The task of the day was quite basic for a SharePoint admin: “move a content database  from one SharePoint environment to another”.
 
CRITERIA
The only requirement was to keep the initial environment live so that we could continue using it while finishing configuring the target environment, therefore we could not stop the access to the content on that one.
 
ENVIRONMENTS
The new server is a different web application (therefore URL), site collection and content database name.
For the purpose of this article let’s call the environment “OLD” and the target environment “NEW”.
Both environment comprises of just one SharePoint 2010 Enterprise server (index and web front end) and one SQL 2008 R2 dedicated server for simplicity.
 
APPROACH
Standard steps to achieve this should be :
  1. On the OLD SQL Server:
  1. Backup the content database to file
(no need to disconnect the site collection from content database as we need to keep old server up and running too)
  1. On the NEW server’s Central Administration: 
  1. Create a new content database. eg. SharePoint_Content
  2. Switch new content database Online and any other databases Offline (this ensures that any new site collection created will be stored on that new database)
  3. Create new site collection
  1. Switch back new content database Offline and the main one online
 
Now that the new empty database exists on the new server, let’s restore the content of the old server’s database into the new one.
  1. On NEW SQL server
  1. Copy the old database backup file into the new SQL server
  2. Select new content database and restore it
4picture_device_independent_bit
  1. From the old content database backup file (“restore from device” in SQL studio)
0picture_device_independent_bit
 
Now check the content of the NEW site collection which should show everything from the OLD database.
  1. Open Central Administration, Application Management, “View all site collections”
  2. Select the newly create site collection.
From that page it should show the content database associated with that site collection as below
2picture_device_independent_bit
Here comes the problem:
in my case the site collection showed up as associated with
none
, making the site collection unusable.
5picture_device_independent_bit
SOLUTION
Re-linking a site collection to a content database can be done in PowerShell or STSADM but since our Site Collection already had this association before we restore the content it was just a question of refreshing that association:
In Central Administration :
  • remove the content database from the list (removing it only “disconnects it” but doesn’t delete the physical database in SQL)
by opening “Manage Content Databases” from “Application Management and” (write down the name of that database before proceeding, for the next step)
  • now add that same content database to the SharePoint Content databases list (type the name you wrote down)
1picture_device_independent_bit
  • Go to “View all site collection” and check that the site collection is now re-associated with the correct content database it was initially.
 
CONCLUSION
It seems that when a database is restored on the SQL side SharePoint got confused and lost its balance which caused the content database to disconnect itself from the site collection(s), re-adding the database manually in Central Administration only revived that association and all went back to normal.
Clearly the best practice would have been to disconnect the database from SharePoint before doing this migration and reconnect it after but in my case I had to keep the old system up and running.
Is this a bug or forgotten step by SharePoint in the restore background process ?
 

Picture_device_independent_bit

3picture_device_independent_bit