Hi Friends,
I'm new to sharepoint 2010. in my organization they given one small workflow to do.
I created the sequential workflow in that while updating main list i'm updating the tasks, the person whom to be assigned.In that i'm getting error occured message in Tasks during inserting in the main list using content type id.
In Log file its showing that value does not fall within range error..
Please help to resolve this last two weeks i'm struggling to resolve this issue.
Please check the below code which was working for create task event but not working for create task with content type id event
private void createTaskWithContentType1_MethodInvoking(object sender, EventArgs e)
{
try
{
string assignedTo = GetHRUser_BUID(workflowProperties.Web, "HRDetails", "1");
taskId = System.Guid.NewGuid();
workflowTaskProperties.Title = "Input Approval Task";
workflowTaskProperties.AssignedTo = assignedTo;
workflowTaskProperties.StartDate = DateTime.Now;
workflowTaskProperties.DueDate = DateTime.Now.AddDays(1.0);
workflowTaskProperties.ExtendedProperties["ApproverLevel"] = "HRNAME";
workflowTaskProperties.SendEmailNotification = true;
HstDescription = string.Format("Workflow task has been created for {0}", assignedTo);
HstOutcome = "Create task event has been competed.";
}
catch (ArgumentException ex1)
{
HstDescription = string.Format("EXCEPTION OCCURED; MESSAGE : {0} STACK TRACE :{1}", ex1.Message, ex1.StackTrace);
HstOutcome = string.Format("EXCEPTION OCCURED; DETAILS : {0}", ex1.ToString());
}
catch (Exception ex)
{
HstDescription = string.Format("EXCEPTION OCCURED; MESSAGE : {0} STACK TRACE :{1}", ex.Message, ex.StackTrace);
HstOutcome = string.Format("EXCEPTION OCCURED; DETAILS : {0}", ex.ToString());
}
}