SharepointFrancois http://sharepointfrancois.posterous.com Ex-Domino consultant went to the Microsoft Sharepoint some years ago, and rumble his thoughts and findings posterous.com Mon, 24 Sep 2012 08:38:00 -0700 How create HTML emails in #Nintex Workflow actions http://sharepointfrancois.posterous.com/how-create-format-html-emails-in-nintex-workf http://sharepointfrancois.posterous.com/how-create-format-html-emails-in-nintex-workf

I will not repeat enough, when it comes to workflow design Nintex workflow is brilliant and save a lots of hassle.   

lThis said not everything in this tool is that easy to achieve, today I am going to mention a basic workflow action that everyone will use for sure in any workflow: the “Send notification” action"

2012-09-24_180105

This action allows you to send an e-mail, a Lync message or even SMS to a user to inform them in the middle of a workflow.

The problem

“Send notification” comes with its own Rich Text editor to format the text and add reference of an item into the subject and body of the message. But very quickly you should realise that the editor has some limitations. In my experience I found it a bit buggy;  for instance : type some text, format it in blue, add field reference to se the values, then save the action and come back to the editor only to find that the 1 carriage return has expanded to 10 and the font you thought was the same in the whole email has change to another in the middle of the body content.

I actually believe that this is not really the problem with the editor itself but just a standard HTML issue: if you check the source of that rich text editor, you will see some characters and font styling that have been added which makes debugging quite hard.

How I do it

Ok, so this is my tip for dealing with HTML email:

1-     Forget about the Rich text editor

2-      Prepare your HTML body away from the workflow action  

3-      When ready, paste it into the editor

 

Show me

Here is, in pictures, how I now do my email body content. My method may not be the best one and took a bit of time for the initial setup of the first email body, but the next ones can just be derived from it and then speed up the tasks. Also you will see that every time  you are requested to change a character in an email, it’s a “piece of cake”.

1-      Open NotePad (or already into an HTML editor such as a SharePoint Designer HTML file, myself I prefer to use NotePad++ as it formats HTML best)

2-      Start your email body with the labels and values you intend to display, leave the reference as a placeholder for now

2012-09-24_180114

3-      Capture the item values or variables that you need to need to show

In the Nintex “send notification” editor, remove all your Rich Text content and only add the single reference that you need, for instance if I want to display the "Title" field value:

Image

4-      Copy the HTML of that reference  

2012-09-24_180210

5-      paste it into the HTML file

2image

6-      Start formatting some HTML around the item value

3image

7- repeat step 3 to 6 until your HTML is complete
8- paste the HTML into the HTML editor of the Nintex Rich Text editor to obtain an email looking as:
1image
9- Make sure you SAVE your HTML code into a file for re-usability.

Conclusion
Each time you need to edit a comma on your rich text email you do so in the HTML and paste it again in the editor. This way you won't have strange behaviour in the editor.
Again: this is my method and may not be everyone's choice, but since I had a workflow with around 6 different email templates this way was the only way I found to make sure that each email is similar except for a couple of fields, otherwise using the Rich Text editor in the Workflow Action (notification or Flexi-Task) didn't prove to be formatted the same as another one.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1375377/me_avatar.jpg http://posterous.com/users/hcksWlFw5buwq Francois Souyri nicofars Francois Souyri
Wed, 29 Aug 2012 03:06:00 -0700 Note to myself about the "Benign OWSTimer unhandled exception popup" http://sharepointfrancois.posterous.com/note-to-myself-about-the-benign-owstimer-unha http://sharepointfrancois.posterous.com/note-to-myself-about-the-benign-owstimer-unha
Media_httpblogsmsdnco_ijbbl

I must google that every year because it escapes my brain or I never believe such a simple error message doesn't get fixed by a service pack on a server so here is the simple answer : don't worry!

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1375377/me_avatar.jpg http://posterous.com/users/hcksWlFw5buwq Francois Souyri nicofars Francois Souyri
Thu, 09 Aug 2012 02:23:00 -0700 Clever idea : Approve or reject tasks via email WITHOUT Nintex http://sharepointfrancois.posterous.com/clever-idea-approve-or-reject-tasks-via-email http://sharepointfrancois.posterous.com/clever-idea-approve-or-reject-tasks-via-email
Check out this website I found at gallery.technet.microsoft.com

I have to say when it comes to responding a workflow task while being mobile I think of advising my clients to buy Nintex Workflow for their Sharepoint farm as the design and maintenance of those workflows is much, much cost effective in the long term. But this post got me thinking, specially when you have an IT environment locked down where you cannot add third party tools.
I have not implemented it myself yet, but will do in a few weeks.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1375377/me_avatar.jpg http://posterous.com/users/hcksWlFw5buwq Francois Souyri nicofars Francois Souyri
Wed, 08 Aug 2012 04:02:00 -0700 Avoid '&' (Ampersand) sign in Nintex workflow variable values http://sharepointfrancois.posterous.com/avoid-ampersand-sign-in-nintex-workflow-varia http://sharepointfrancois.posterous.com/avoid-ampersand-sign-in-nintex-workflow-varia

Issue:

 I have a main workflow that calls 16 different sub-workflow to run and wait for their completion before continuing and to my surprise only 1 of those didn't send me an email as I expected it to be, but did not fail nor stopped.

 

Troubleshooting:

 The sub-workflows are all running and complete, then the main workflow continues its journey to completion.

Nintex16

By adding a Log in History to extract all the variables that I pass to the sub-workflows I then realised that the only difference between all sub-workflow and the one that flies through without sending an email contains a '&' character in one of the variable. That variable is just used to print the value in the body of the message, not even the subject or the recipient email but still it did fail the workflow action.

 

Fix:

by adding a "Regular Expression" Nintex action we can easily replace any ampersand in variable before passing it to the sub-worklow. If you place it into the sub-worlfow UDA then it's only 1 change for all 16+ sub-workflows.

 

Note to self: filter out & character (ever)

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1375377/me_avatar.jpg http://posterous.com/users/hcksWlFw5buwq Francois Souyri nicofars Francois Souyri
Thu, 26 Jul 2012 08:05:00 -0700 Note to self: hide "add document" and "add item" from Sharepoint site in 2 seconds http://sharepointfrancois.posterous.com/note-to-self-hide-add-document-and-add-item-f http://sharepointfrancois.posterous.com/note-to-self-hide-add-document-and-add-item-f

Add this to your custom site CSS :

<style type="text/css">
#WebPartWPQ2 .ms-addnew
{
display:none;
}
</style>

Hideme

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1375377/me_avatar.jpg http://posterous.com/users/hcksWlFw5buwq Francois Souyri nicofars Francois Souyri
Thu, 26 Apr 2012 15:08:00 -0700 Live Blogging from the International Sharepoint Conference 2012 : the list http://sharepointfrancois.posterous.com/live-blogging-from-the-international-sharepoi http://sharepointfrancois.posterous.com/live-blogging-from-the-international-sharepoi

This week I was at the #ISCLondon Monday-Tuesday-Wenesday and I was asked a while ago by @Mattmoo2 to blog for the event which I did, until I realised at day 2 that I was not blogging to the conference official blog but his own blog.. oh well, I am very nice so I kept writing!

Then I also reported back to my other home back at Sharepoint Shenanigans which kind of made me feel like a blogger-slut going from one blog to another but that's ok, it's all for a good cause!

We need a bit of structure don't we ? so here is below a list of the various blogs I saw this week, mine and others, all in a one page for your pleasure to read.

full agenda can be found here.

  • IT110 - Working with Enterprise Search Part 2 - Neil Hodgkinson

Blog post by Thomas Vochten

  • IT111 - Migrating Content to SharePoint - Kimmo Forss

Blog post by Thomas Vochten

  • IT112 - Custom Solutions and Capacity Management part 1 - Ben Curry, Steve Smith, Spencer Harbar

Blog post by Thomas Vochten

  • IT113 - Custom Solutions and Capacity Management part 2 - Ben Curry, Steve Smith, Spencer Harbar

Blog post by Thomas Vochten

  • IT114 - Planning for the Cloud - Kimmo Forss, Spencer Harbar

Blog post by Thomas Vochten

  • IT115 - Office 365 and Cloud Deployment Part 1 - Kimmo Forss, Spencer Harbar, Mirjam van Olst

Blog post by Thomas Vochten

  • DEV202 - Project Startup Part 2: Customizing Visual Studio to suit your needs - Wictor Wilén, Waldek Mastykarz

Blog post by Francois Souyri

  • BUS307 - Why do HR always want something different - Rob Foster

Blog post by Francois Souyri

  • IW403 - Solution 1 - Building the travel request solution - Part 3:Planning and building the user interface - Jennifer Mason, Matthew Hughes

Blog post by Francois Souyri

  • IW404 - Solution 1 - Building the travel request solution - Part 4:Reporting and Business Intelligence on travel requests - Darvish Shadravan, Laura Rogers

Blog post by Francois Souyri

  • IW406 - Solution 4 - Building a Records Management solution - Part 1: Building and Using SharePoint-Friendly File Plans - John Holliday

Blog post by Francois Souyri

  • IW409 - Solution 4 - Building a Records Management solution - Part 4: Leveraging Workflow to Maximize the Benefits of In-Place Record Declaration - John Holliday, Agnes Molnar

Blog post by Francois Souyri

  • IW413 - Solution 7 - Building Workflows - Part 1: Introduction to workflow design - Mike Fitzmaurice

Blog post by Peter Baddeley 

  • IW414 - Solution 7 - Building Workflows - Part 2: Using SharePoint Designer to create a workflow in real life - Penny CoventryCathy Dew

Blog post by Peter Baddeley 

  • IW415 - Solution 7 - Building Workflows - Part 3: SharePoint Designer Workflows in Office 365 - Penny Coventry

Blog post by Peter Baddeley

  • IW505 - Working with Mysites and what makes them special - Bob Fox

Blog post by Francois Souyri

  • IW509 - Solution 8 - Working with External Data in SharePoint - Part 1: Working with Dynamics CRM and SharePoint - Nick Swan

Blog post by Peter Baddeley

  • IW608 - Solution 6 - Building a Custom Branded Portal - Part 5: Development Extras - Tips and tricks for CSS and SharePoint - Cathy Dew

Blog post by Francois Souyri

  • IW610 - Solution 6 - Building a Custom Branded Portal - Part 7: How best to deploy your site branding customizations - Cathy Dew, Paul Schaeflein

Blog post by Francois Souyri

  • IW611 - SharePoint Stars in the Minority Report (Kinect ;-) - Daniel McPherson

Blog post by Francois Souyri

  • IW616 - Introduction to Visio Services - Jennifer Mason

Blog post by Peter Baddeley &  Francois Souyri

  • CS701 - Real World: Building a global Business Intelligence Extranet, from End Users to Support and Operations - Martin Hatch

Blog post by Francois Souyri

 

if you know of any blogs that have been reported the conference, let me know and I will add them here.

 

 

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1375377/me_avatar.jpg http://posterous.com/users/hcksWlFw5buwq Francois Souyri nicofars Francois Souyri
Wed, 18 Apr 2012 11:40:51 -0700 Error when customising a Sharepoint 2010 list form in InfoPath 2010 http://sharepointfrancois.posterous.com/error-when-customising-a-sharepoint-2010-list http://sharepointfrancois.posterous.com/error-when-customising-a-sharepoint-2010-list A very simple Infopath error that I have seen before and took me 2 second to realise what was wrong, but still it can be useful to remind one-self.

scenario:
- You have just created a new very simple list in your Sharepoint 2010
- You want to the form a bit more fancy, so you click the "customize form" 
Image

- and 
1image
Error -->  
0image

SOLUTION: 

Not that obvious since the error is very misleading (we are used to that, aren't we!) the default View or only View of your list is in DataSheet mode, just go and create a new Standard View, make it the default and now the form can be edited by InfoPath without complaining.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1375377/me_avatar.jpg http://posterous.com/users/hcksWlFw5buwq Francois Souyri nicofars Francois Souyri
Fri, 30 Mar 2012 09:12:12 -0700 Back to posting and the importance of PAUSE in Sharepoint Workflow http://sharepointfrancois.posterous.com/117231266 http://sharepointfrancois.posterous.com/117231266
The importance of PAUSE in Workflow

I have not been blog-ing anything for a while because since moving into our new house there is always something to do than sitting on computer between working hours. Now that we are all settled and I have a proper study (instead of the kitchen table) I have some catch-up to do with a few notes that I need to post.

Here is a short one regarding timing in workflow execution.
Last week I wrote a very-very simple workflow for my team which updated values of an item after this item was modified by the end user. There is nothing easier than this in Sharepoint Designer (2007 AND 2010 indeed).
All was fine in my very-very simple tests since this was really a no brainer, however a few users complained that they kept receiving the "conflict error" message. 
Eventually I realised that some -if not most- users would edit the items in a datasheet view and come back to the same row WITHIN 5 seconds of having updating it, therefore the SPD workflow was still running when they came back to the item, and while the user was exiting the datasheet row of the item Sharepoint had already saved it via workflow, ending up into a save conflict. I have to say that I never planned for users to be so fast in Sharepoint, we are usually used to wait for page to load and therefore forget that Datasheet mode is way faster.

After much workaround playing I remembered that SPD allows us to add a PAUSE within the workflow, and so I did, mark a 5 minutes pause before updating the fields, and it all sorted the conflict message the end user were receiving.
Pause_workflow

So let's remember to slow down even in a workflow sometimes, to quote this Nigerian proverb that a friend reminded me this morning : "Going slow does not prevent arriving.", as long as my item gets updated its value within the hour users are happy.

 

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1375377/me_avatar.jpg http://posterous.com/users/hcksWlFw5buwq Francois Souyri nicofars Francois Souyri
Sun, 08 Jan 2012 02:37:00 -0800 Force Sharepoint to open full site when viewed from a mobile device http://sharepointfrancois.posterous.com/force-sharepoint-to-open-full-site-when-viewe http://sharepointfrancois.posterous.com/force-sharepoint-to-open-full-site-when-viewe

What sounded really cool when first launch may turn to be not so great in Sharepoint : opening a page with a mobile / smartphone.

By default Sharepoint 2010 detects that you are using a mobile device and will redirect your page to the mobile version of that same page (/_layouts/mobile/xxx.aspx or old /_layouts/m/xxx in 2007).

to force your site to open the full (desktop) version, follow this blog post and either edit one of the 3 settings or all did the trick for me: 

http://blogs.pointbridge.com/Blogs/broweleit_seth/Pages/Post.aspx?_ID=14#EntryTabs

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1375377/me_avatar.jpg http://posterous.com/users/hcksWlFw5buwq Francois Souyri nicofars Francois Souyri
Wed, 30 Nov 2011 04:00:00 -0800 Make a Sharepoint publishing site NOT convert to mobile format http://sharepointfrancois.posterous.com/make-a-sharepoint-publishing-site-not-convert http://sharepointfrancois.posterous.com/make-a-sharepoint-publishing-site-not-convert

It has been like months that I wanted to look at this common issue : when you open a Sharepoint publishing site from a mobile device, it recognises the device is mobile and forces to open the mobile version, but prompts fo ra login, not great for anonymous users !

thanks to Glyn Clough's I now have an explanation of the why (cf. feature in his reverse engineering tests) and thanks to Randy Drisgill I manage to force mobile users to open the full desktop site, which looks much better on an iPhone anyway.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1375377/me_avatar.jpg http://posterous.com/users/hcksWlFw5buwq Francois Souyri nicofars Francois Souyri
Sat, 19 Nov 2011 05:38:00 -0800 Feedback from the few sessions I attended at Sharepoint Saturday UK, 12th Nov 2011 http://sharepointfrancois.posterous.com/sharepoint-saturday-uk http://sharepointfrancois.posterous.com/sharepoint-saturday-uk

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.

 

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1375377/me_avatar.jpg http://posterous.com/users/hcksWlFw5buwq Francois Souyri nicofars Francois Souyri
Thu, 27 Oct 2011 10:02:20 -0700 Run SPD2010 workflows with impersonated permission http://sharepointfrancois.posterous.com/run-spd2010-workflows-with-impersonated-permi http://sharepointfrancois.posterous.com/run-spd2010-workflows-with-impersonated-permi

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.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1375377/me_avatar.jpg http://posterous.com/users/hcksWlFw5buwq Francois Souyri nicofars Francois Souyri
Fri, 02 Sep 2011 03:53:57 -0700 Update Infopath connection file automatically when deploying to new environment http://sharepointfrancois.posterous.com/update-infopath-connection-file-automatically http://sharepointfrancois.posterous.com/update-infopath-connection-file-automatically

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

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1375377/me_avatar.jpg http://posterous.com/users/hcksWlFw5buwq Francois Souyri nicofars Francois Souyri
Sat, 30 Jul 2011 16:23:22 -0700 Content database not associated with site collection after restoring its content http://sharepointfrancois.posterous.com/content-database-not-associated-with-site-col http://sharepointfrancois.posterous.com/content-database-not-associated-with-site-col
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

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1375377/me_avatar.jpg http://posterous.com/users/hcksWlFw5buwq Francois Souyri nicofars Francois Souyri