Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
SendEmail Activity in SharePoint 2010 Sequential Workflow
WhatsApp
Rajkiran Swain
9y
3.2
k
0
0
25
Blog
To create sequential workflow in SharePoint 2010 using Visual Studio 2010 please refer my previous
blog
. SendEmail activity is used to create a task in the Tasks list.
Steps Involved
Go to toolbox, drag and drop the SendEmail activity from SharePoint Workflow section onto the workflow design surface (Workflow1.cs[Design]).
Go to sendEmail1 properties, select the CorreleationToken as workflowToken and in theOwnerActivityName select workflow1.
Next we need to set the To property, click on the …button in the To property.
Click on Bind to a new member tab, select Create Field option and then click on Ok.
Similarly set the Subject and Body property.
To property:
sendEmail1 properties:
Workflow1.cs:
using
System;
using
System.ComponentModel;
using
System.ComponentModel.Design;
using
System.Collections;
using
System.Drawing;
using
System.Linq;
using
System.Workflow.ComponentModel.Compiler;
using
System.Workflow.ComponentModel.Serialization;
using
System.Workflow.ComponentModel;
using
System.Workflow.ComponentModel.Design;
using
System.Workflow.Runtime;
using
System.Workflow.Activities;
using
System.Workflow.Activities.Rules;
using
Microsoft.SharePoint;
using
Microsoft.SharePoint.Workflow;
using
Microsoft.SharePoint.WorkflowActions;
namespace
SequentialWorkflow.Workflow1
{
public
sealed
partial
class
Workflow1: SequentialWorkflowActivity
{
public
Workflow1()
{
InitializeComponent();
}
public
Guid workflowId =
default
(System.Guid);
public
SPWorkflowActivationProperties workflowProperties =
new
SPWorkflowActivationProperties();
private
void
onWorkflowActivated1_Invoked(
object
sender, ExternalDataEventArgs e)
{
}
public
String sendEmail1_To1 =
default
(System.String);
public
String sendEmail1_Subject1 =
default
(System.String);
public
String sendEmail1_Body1 =
default
(System.String);
private
void
sendEmail1_MethodInvoking(
object
sender, EventArgs e)
{
sendEmail1_To1 = “
[email protected]
”;
sendEmail1_Subject1 = “Testing”;
sendEmail1_Body1 = “Testing”;
}
}
}
SendEmail Activity in SharePoint
Sequential Workflow
Up Next
How to create sequential workflow in SharePoint 2010 using Visual Studio 2010
Ebook Download
View all
Configure MinRole Search and Cloud Hybrid Features in SharePoint Server 2016 and Office 365
Read by 1.6k people
Download Now!
Learn
View all
HCL Tech
HCL Tech
Membership not found