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 have created a custom Sequential workflow in which i am assigning task to user like :

private void createTask1_MethodInvoking(object sender, EventArgs e)
{
   SPListItem currentItem = workflowProperties.Item; 
   RequestApproveTaskId = Guid.NewGuid();
   RequestTaskProperties.Title = "";
   RequestTaskProperties.Description = "Please review the request";
   RequestTaskProperties.StartDate = DateTime.Today;            
   RequestTaskProperties.AssignedTo = userName;            
   RequestTaskProperties.EmailBody = this.EmailBody;
   RequestTaskProperties.HasCustomEmailBody = true;
   RequestTaskProperties.SendEmailNotification = true;
}

its creating task properly and assigning to user. No issue. and I have set workflow start on adding new item.

Problem comes when I edit/update the List item value on which workflow is running and is in process. Insted of updating the existing item, It add one more item in the library with updated value which again run workflow on newly added list item.

So, My Question is how to stop this get added new item with updated value. Please respond I am not getting solution on Google.

share|improve this question
    
I solved it. There are OntaskChange() and OnWorkflowItemChange() activity, first get fired when u edit the task and second get fired when you edit the List/Library associated with workflow. –  Atulya Oct 19 '13 at 7:36
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.