Posterous theme by Cory Watilo

How create HTML emails in #Nintex Workflow actions

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.

Clever idea : Approve or reject tasks via email WITHOUT Nintex

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.

Avoid '&' (Ampersand) sign in Nintex workflow variable values

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)

Live Blogging from the International Sharepoint Conference 2012 : the list

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.

 

 

Error when customising a Sharepoint 2010 list form in InfoPath 2010

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.

Back to posting and the importance of PAUSE in Sharepoint Workflow

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.

 

Force Sharepoint to open full site when viewed from a mobile device

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

Make a Sharepoint publishing site NOT convert to mobile format

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.