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)
        CustomCodeActivity activity = obj as CustomCodeActivity;

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

        // ** Success
        return base.Validate(manager, obj);
    catch(Exception ex)
        return compiler.ValidationErrorCollection;
  • Did you ever find the answer to this that you can provide below?
    – Alex Angas
    Jun 6, 2011 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. Jun 6, 2011 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, 2011 at 5:54

1 Answer 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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