Archive for September, 2008

Workflow Error: System.InvalidOperationException and the Correlation Token

I got a slightly obscure error message when trying to run a DeleteTask activity in my workflow:

System.InvalidOperationException: Correlation value specified does not match the already initialized correlation value on declaration taskToken for activity deleteTask1.

Hmm. I checked the correlation token though - and it was fine. And what’s it doing initialising another token? Found the answer though, courtesy of Matt Morse - I’d not set the task ID property for the delete task activity.

This did lead me around to wondering why I have to? I mean, we’ve a correlation token for the task. The correlation token contains the TaskID. And yet I have to specify both of these things to the DeleteTask activity to identify the task I want deleted? Something ain’t right there…

Getting Infopath forms to work with VSeWSS3 version 1.2

More workflow fun - this time caused by my using the latest Visual Studio project for building SharePoint workflows - at this time it’s the one packaged in the VSeWSS3 version 1.2.

Back in the days of RTM, Workflows had a rubbish Visual Studio Project - I mean, awful. “Some assembly required” is really understating it. However, an improved version came along, and it was alright. Sure, there was some fiddling with batch files, but it worked. You could build it, deploy it, and test it easily, and it was pretty easy to get a simple workflow and some InfoPath forms working.

This is my first time using the 1.2 installer, which looks much more sexy - it’s got a wizard and does the ‘deploy’ bit for you, so no fiddling with .bat files. However, I couldn’t get InfoPath forms to appear for my workflow. The were getting deployed into the FEATURES folder, but when I ran the workflows - just ordinary task views appeared.

Bugger. Read more »

Modify ListItem Display to show referencing items…

SharePoint is made up of lists of items, where an item is a set of data. Here is the standard display of an item’s properties:

As you can see, we’ve got a item, and it has some fields of data, and they’re being displayed inside a web part. Those fields are columns on the list:

All very familiar, I’m sure. It gets interesting when we start using Lookup columns, though. These are columns that refer to items in other lists. For example, this is a list of documents, but they refer to items in the above list (that’s what the Item Ref column is doing):

Cool, but wouldn’t it be great if I could show a list of items referring to a particular item on it’s display page? For example, in this case wouldn’t it be good to show a list of ‘Item Documents’ on the DispForm.aspx page used to show the Item’s properties? Well, you can:

(Edit: one of my colleagues points out that Microsoft did this in one of the Fab 40 templates - but I didn’t know).

So how does it work? Read more »

FatalErrorNoThrow when verifying a form template

You can tell you’re using Infopath and SharePoint workflow when nothing works. I was using STSADM to verify a form template, and I kept getting an error. The error I was getting was:

FatalErrorNoThrow : This form template has not been correctly published to be browser-enabled. Open the form template in InfoPath Design mode, and click Publish Form Template in the Design Tasks task pane. Follow the steps in the Publishing Wizard to republish the form template, and then try again.

Gee, thanks. Advice to ‘try again’. Useful.

It transpires that the problem was from when publishing the InfoPath form; you have to make sure that the access path in the publishing wizard is empty. Fortunately, I now know enough about Infopath to have no idea that this is about - but making the access path empty did seem to work…

Make sure that the box highlighted in yellow is empty.

Adding a SharePoint system to the Vista Start menu…

The only thing that I really like about Vista (in a ‘I wouldn’t like to go back to not having this’ way) is the search box in the start menu. To be honest, I’ve stopped clicking to start applications entirely - it works that well.

Well, today, I had a surprise. One of my colleagues asked me to test something for him, and update my Group Policy - so I did:

Then he asked me to search for something in the Vista start menu - and look what I found:

That’s right, a ‘Search SharePoint’ option. Read more »

Search Date Formats…

I keep forgetting this, so a note to myself. Date formats in search results in SharePoint are defined by:

  • For Team Sites, the sites Regional Settings
  • For Collaboration Portals, the Search Center’s Regional Settings

Now, if only I can remember that this time. Often I see systems showing the dates in American date format (don’t get me started on that one!) and this is how you change the displayed format.

Of course, this raises the question of, if you have offices in, say, London and Paris, how do you support the different time zones? Hmm. I’ll have to puzzle over that.

Adding a Custom View Style to MOSS 2007 or WSS3

Previously I’ve mentioned the intriguing idea of creating a custom view style for SharePoint 2007. Well, it turns out that instructions exist for how to do this in SharePoint 2003 - but I couldn’t find any for MOSS 2007 or WSS3. Well, it turns out that it’s not really that different, as far as I can see!

Read more »

Regarding SharePoint View Styles…

I had to explain to one of my colleagues that SharePoint Lists could be presented as more than just, well, lists - so here are my examples… Read more »

RSA SecurID and SharePoint

I’d an interesting question from a customer the other day - they wanted Forms Authentication on extranet access to SharePoint, but using two factor authentication. The product mentioned was RSA SecurID, and this means that to authenticate yourself you need:

  • Your Username
  • A hardware device that shows a pseudo-randomly generated PIN number which changes every minute or so.

‘Cos the PIN is a pseudo-random sequence, if the token and a server are in sync, you can validate that someone has read that token inside the last minute. It’s an expensive technology - but neat!

The idea is the same as, say, a credit card. More than just saying who I am and that I have some piece of knowledge (e.g. my PIN number), I also have to have a physical object which is hard to duplicate (my credit card). This should make my identity more certain.

Anyway, how does this fit with SharePoint? Read more »

ASP.NET CustomErrors can’t capture HTTP 401s…

It’s been a mad few weeks, so sorry for the posts tailing off a bit. Anyway, let’s get back into it with an interesting (and fairly short) problem.

ASP.NET applications can have custom error pages for the different HTTP responses. For example, you can have a custom “404 - Page not found”. Now, this can be a good idea, particularly for errors that produce stack traces or provide potentially sensitive information about the workings of your code. Or, heck, maybe you just want to present a nice looking error page. Read more »

Next Page »