0

When I create a task with activity "CreateTaskWithContentType", I can't bind a custom ContentType with the list "Tasks".

I created a new content type and select the "Task" as parent, then added this content type to my task list.

Then I get my content type id and set the "ContentTypeID" property of "CreateTaskWithContentType" activity in the vs 2013 by this ID, and after that click on taskid property and click "bind to new member" and then "create field" inorder ro create taskid property. I also created a taskProperties for my activity.

I determine a method for invoking this activity :

        createTaskWithContentType1_TaskId1 = Guid.NewGuid();
        createTaskWithContentType1.ContentTypeId = "0x010800FEAA30385A36B042BF804D643DBC9EEF";
        createTaskWithContentType1_TaskProperties1.Title = "Approve document";
        createTaskWithContentType1_TaskProperties1.AssignedTo = @"sps2013\Modrek";
        createTaskWithContentType1_TaskProperties1.DueDate = DateTime.Now.AddDays(1.0);

But it doesn't work and after I started workflow the workflow accrued an error. Do you have any idea how I can do this ?

thanks in advance.

0

Here is a real useful link for creating task with content type. Click here

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.