Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

How to set ContentTypeID in CreateTaskWithContentType activity using VS 2013

$
0
0

Hi,

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.


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>