0

I have created a SharePoint State Machine workflow in Visual Studio 2010 and all works fine and all emails are sent out correctly. I would like to change the content of the email that is sent out (i.e custom subject, email body, etc.) Is this possible in VS2010? I know you can do this in SPD workflow by manipulating properties, but can this be done the same in Visual Studio? Is their a way to import the solution package in to SPD to be changed?

Would I be able to use the createTask option in my stateInitialization Activity as well as the onTaskChanged eventDriven Activity to make this happen?

2 Answers 2

0

For workflow Task Email you can only change the email body and the subject line must stay the same. To change the email body do the following

Just do like this within your MethodInvoking statement for the state you are sending out a custom email

this.myTaskProperties.EmailBody = "define your custom message body here. You can write html"; 
this.myTaskProperties.SendEmailNotification = true; 
0
this.myTaskProperties.EmailBody = "Define your custom message body here. You can write html";
this.myTaskProperties.SendEmailNotification = true; 
this.myTaskProperties.HasCustomEmailBody = true;

The above worked for me.

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.