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

I am writing a custom action and running into an error on the publish stage of the SPD workflow editor.

Essentially, my problem is that my dependency properties are not working correctly. Half of them do work without error--but I have two properties that are strings that are causing the error.

In the activity class:

public static DependencyProperty StatusProperty = DependencyProperty.Register("Status", typeof(string), typeof(emailaction));
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
[ValidationOption(ValidationOption.Required)]
[Browsable(true)]
[Description("Status")]
public string Status
{
    get { return ((string)(base.GetValue(emailaction.StatusProperty))); }
    set { base.SetValue(emailaction.StatusProperty, value); }
}

In the actions file:

<Parameter Name="Status" Type="System.String, mscorlib" Direction="In" />

Is there anything glaringly wrong here that is causing the error? Both my string dependency properties are causing problems, but my "int" and "WorkflowContext" properties are not returning errors.

EDIT: After further investigation, I had two errors happening at the same time and assumed they were the same problem. There is actually no problem with the above code, I made the mistake of testing this without filling in a value. I am in fact having issues pulling in the list ID properly, but I will look into this further before posting a separate question.

share|improve this question
add comment

1 Answer

The code given above was returning a workflow error simply because I did not fill in a value before trying to check the workflow. The other field that's giving me issues will need to be investigated further.

share|improve this answer
add comment

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.