0

I'm creating a SharePoint App that contains a custom SharePoint 2013 Workflow made in Visual Studio 2013. My workflow assigns a task to a user. However, I noticed the default e-mail that is sent when the workflow is assigned (created) doesn't contain any usable body text (i.e. no link to the Task Item). So I want to build my own e-mail text and send my own e-mail.

I've set the WaitForTaskCompletion property to 'false' and added a few activities that create the e-mail. However, I noticed the SingleTask Activity still sends out its own e-mail. So people now get two e-mail notifying them that they've been assigned a task: one from SingleTask and one from my custom Email Activity.

I know the SharePoint Designer 2013 'Assign a task' activity has a property called WaiveAssignmentEmail that prevents the activity from sending its own e-mail when a task is created. When I look at the workflow XAML SPD creates it is clearly visible and this also seems to work:

<local:SingleTask ... WaitForTaskCompletion="False" WaiveAssignmentEmail="True">

However, I cannot find this property in Visual Studio's SingleTask activity. In fact, when I Googled for it I couldn't find any reference to it. It also looks like it isn't documented on MSDN. I fired up .Net Reflector and searched inside the assemblies, but also no reference to it. Still it does seem to work for SPD generated workflows, so it must live somewhere, right?

I tried adding the attribute my Visual Studio workflow by directly editing the workflow.xaml file in text-mode. But the Designer doesn't accept it and the project will not compile. Probably because SPD uses different namespaces (i.e. different SingleTask classes?).

Does anybody know how to prevent the SingleTask activity from sending out an e-mail when a task is assigned?

1 Answer 1

1

After some research I found an answer to a similar question:

It seems like you can not disable the email using the singleTask activity. But you can change the assignedEmailBody in the properties window. A link to the task can be created like this:

< a href='%TaskSpecial: TaskUrl%'>%Task: Title% < /a> (delete whitespaces after < a>)

See also: https://stackoverflow.com/questions/18391795/how-to-send-the-assignment-email-with-a-link-to-the-task-in-it-sharepoint-2013-v

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.