Blog of an overweight SharePoint addict

Tue 25 Sep 07

Handy logging info..

Filed under: SharePoint, Troubleshooting — Reginald @ 11:46 am

I have an issue when it comes to debugging if a problem hits on the live environment. For some reason I cannot get the debugger to attach..

As a temporary solution, I made use of a technique pointed out by Clin Byrne on the SUGUK forums that makes use of the MICROSOFT.OFFICE.SERVER.DIAGNOSTICS namespace, and more importantly, the PortalLog object.

This method is VERY simple to use, all you need is a reference in your project to the Microsoft Office Server.dll.

Once thats in place, you can use the following at any point in your code to dump an entry into the latest log in the 12 Hive.

PortalLog.LogString("Any freeform text your like here")

Reg.

Mon 24 Sep 07

Well that was a nice break!!

Filed under: SharePoint, Workflow — Reginald @ 10:18 am

Well, almost, the fact is I’ve been working all the hours that some divine being of any denomination can send to get the pilot out on time. And it’s there, the users are getting stuck in and the feedback so far is that they like it.

There’s been a couple of silly bugs, most of which I’ve posted about on the SUGUK forums to get answers on, Some of which I’ve gained some great nswers, and some where I haven’t been able to get any help..

Parallel Workflows with Delay activities that don’t fire!

This one discusses the problem of workflows tha go to sleep when they hit the delay activity, but then never wake up again. This is firmly rooted into a fault in the MS code, for which there is a KB article to fix it.

Obtaining the Task URL for a workflow Task Item

This one looks at how to obtain the URL of the task newly created in a workflow. This is then formatted into an e-mail and used to send in an e-mail notification to the target user.

Grabbing updates prior to loading Forms with onTaskChanged events.

This one didn’t get an answer yet, but it looks at how, in a parallel workfow, where one leg has no user interaction, you can grab info and display it in the User form in the other leg. (Best read it to understand, that bit didn’t make much sense when I typed it out!)

Checking SPListItem lock/update status in code

No answer that can easily be used in my situation here, I came up with my own by dropping a 5 minute delay timer into the start, but this is still a messy situation.

Last but not least… CAML Queries – handling Does NOT contain

This looks at how to compare two fields in an entry and display it when Field 1 contains a single word in a string array and where Field 2 DOES NOT contain the aforemention String.

Anyways, as promised, I will be doing a post on Parallel workflows very soon, just need to get the last workflow in place for the finalisation mode of the pilot..

Also, I’m off to the K2.Net Black Pearl launch on Wednesday, so keep an eye out for me, I’ll be the tubby bloke with short dark hair and the look of a person who hasn’t slept for the last 6 weeks!

Reg.

Powered by WordPress