Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

One of our custom SharePoint Designer workflow activities, which have always worked fine in SharePoint 2007, fails to validate.

This appears to happen when a Workflow Activity that contains a StringBuilder field also contains a lookup variable.

<FieldBind Field="CustomCode" Text="this code" Id="1" DesignerType="StringBuilder" />

For example when we store the following in this StringBuilder field

"Today's date = [%Current Item:Transaction Date%]"

This field returns 'null' in the ActivityValidator. As a result we cannot validate its contents.

When we change the content of this StringBuilder field to

"Today's date = 18/08/2010"

Then we can read the content of this field in the ActivityValidator.

Is this a known bug in SharePoint 2010? Are there any workarounds other than not validating on SharePoint 2010?

Our code is very basic and follows the typical ActivityValidator pattern.

public override ValidationErrorCollection Validate(ValidationManager manager, object obj)
{
    try
    {
        CustomCodeActivity activity = obj as CustomCodeActivity;

        ... try to read content of StringBuilder field, which fails

        // ** Success
        return base.Validate(manager, obj);
    }
    catch(Exception ex)
    {
        EventLog.WriteEntry(ex);
        return compiler.ValidationErrorCollection;
    }
}
share|improve this question
    
Did you ever find the answer to this that you can provide below? –  Alex Angas Jun 6 '11 at 4:17
    
Nop, it is a consistent bug, although I haven't checked it again with any of the more recent 2010 CUs. I really should escalate it to MS Support. –  Muhimbi Jun 6 '11 at 5:23
    
If we can be reasonably confident it's a bug, could you please leave that as an answer? Then we can get it off the unanswered list. Once you've been able to raise it with MS Support please come back and let us know. –  Alex Angas Jun 6 '11 at 5:54

1 Answer 1

up vote 0 down vote accepted

I have just installed the May 2011 SP2010 CU and the problem is still there.

This appears to be a bug / change of behaviour in SP2010, which I will escalate to MS-Support.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.