aarebrot.net Frode's blog on Sharepoint and other stuff

How sloppiness and SPWorkflowTask.AlterTask() could inadvertantly lock your workflow task

Posted on October 19, 2011
VN:F [1.9.22_1171]
Rating: 5.0/5 (3 votes cast)

The SPWorkflowTask.AlterTask() method is handy dandy. It allows us to alter task details from outside of the workflow itself. I was using it in a couple of custom task forms I had created to update the task based on some user input. It's pretty simple. You get a reference to the active workflow task item, create a hashtable that you populate with the data you want to change, then use AlterTask() to update the task.

This is pretty much exactly what I was doing, except I threw in an item.Update() after my SPWorkflowTask.AlterTask() call for good measure. I wasn't sure if the AlterTask() actually did an Update() internally so I figured it couldn't possibly hurt, right?

Speaking at the Prairie Dev Con, in November

Posted on August 12, 2011
VN:F [1.9.22_1171]
Rating: 5.0/5 (1 vote cast)

Prairie Dev Con logoI will be doing a session on  SharePoint 2010 workflows at the Prairie Dev Con in Winnipeg this fall. The event takes place at the Viscount Gort Hotel on November 21 and 22. This session will feature part of the presentation I did earlier this year, but will focus on and delve deeper into workflows. Be sure to check it out to see how to develop a complete workflow with custom forms using Visual Studio 2010 (without InfoPath). Also make sure you check out their website and get your tickets while the early bird offer is still on. Hope to see you there!

Creating custom content type forms using aspx pages in SharePoint 2007

Posted on August 10, 2011
VN:F [1.9.22_1171]
Rating: 4.2/5 (5 votes cast)

I'm working on a project where I need to create some custom task forms for a workflow. I've been looking into a few different ways of doing it and I ended up deciding on using custom aspx pages to do the job. I figured I should share how to do it although it's not all that hard.

But hang on... Why aspx pages? Why not InfoPath? You'd think using InfoPath would be a no-brainer, considering creating custom forms is it's entire purpose in life.

How to force InfoPath forms to open in the browser when linked in an email

Posted on July 8, 2011
VN:F [1.9.22_1171]
Rating: 4.9/5 (9 votes cast)

We recently put a rather complex SharePoint workflow into production. Our workflow is creates a lot of tasks, and each time a task is created a custom email is sent to that user with a link to the task. We create the body of this email ourselves, including the link to the task. The user clicks on the link and the task opens up in Internet Explorer and they can do whatever they need to do. We always want the forms to open in the browser and to begin with everything was peachy.

However after a few pilot users had been upgraded to Office 2010, which included the InfoPath client, it came to our attention that when they clicked on the link in the email it would open it up in the InfoPath client rather than opening it up in the browser. We would want the experience to be consistent so obviously this was not desirable.

Troubleshooting SharePoint 2007: Clicking buttons in Central Administration does nothing

Posted on June 14, 2011
VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

Yesterday I was helping a colleague of mine setting up her SharePoint 2007 virtual machine, and at one point she needed to make some changes in Central Administration. Problem was, when she clicked the "OK" (or "Cancel") buttons after having put in her new settings nothing happened. No page load, no error, no nothing.