sharepoint 2010中的createtaskwithcontenttype任务创建错误 [英] createtaskwithcontenttype task creation error in sharepoint 2010

查看:76
本文介绍了sharepoint 2010中的createtaskwithcontenttype任务创建错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,



我是sharepoint 2010的新手。在我的组织中他们给了一个小工作流程。

我在visual studio中创建了状态机工作流并在sharepoint中部署。



i使用创建任务来创建默认内容类型的任务。但是现在我想使用createtaskwithcontenttype.I替换createtask with createtaskwithcontenttype并且还给了contenttype id。但是当我部署它在工作流中出现它的显示错误时。

请帮助解决这个问题我很难解决这个问题。



这是createtaskwithcontenttype调用中的代码:



Hi Friends,

I'm new to sharepoint 2010. in my organization they given one small workflow to do.
I created the state machine workflow in visual studio and deployed in sharepoint .

i used create task to create task by default content type.But now i want to use createtaskwithcontenttype.I replaced createtask with createtaskwithcontenttype and also gave the contenttype id.but when i deploy that its showing error occured in workflow.
Please help to resolve this i am struggling to resolve this issue.

this is the code in createtaskwithcontenttype invoking:

private void createTaskWithContentType1_MethodInvoking(object sender, EventArgs e)
        {

            createTaskWithContentType1_TaskProperties1 = new SPWorkflowTaskProperties();
            createTaskWithContentType1_TaskId1 = Guid.NewGuid();
         //   createTaskWithContentType1_ContentTypeId1 = "0x0108003A026B8335DC724AAA9A3A7D81A12F5B";
            createTaskWithContentType1_TaskProperties1.Title = "Approve Document(CType)";
            createTaskWithContentType1_TaskProperties1.AssignedTo = @"domain\name";
            createTaskWithContentType1_TaskProperties1.DueDate = DateTime.Now.AddDays(1.0);
        }





谢谢和问候,

jyothi



thanks and regards,
jyothi

推荐答案

我看到我使用的内容类型为0x0108003A026B8335DC724AAA9A3A7D81A12F5B,它以0x010800xxx开头。这是标准任务内容类型的内容类型ID。



如果是工作流任务,它应该以0x01080100xxxxxxxxx开头



我更新了内容类型以从工作流任务内容派生。

现在我的内容类型ID是0x010801003A026B8335DC724AAA9A3A7D81A12F5B ...
I see that i have used content type "0x0108003A026B8335DC724AAA9A3A7D81A12F5B", it starts with 0x010800xxx. This is the content type id for standard task content type.

If it is workflow task it should start with 0x01080100xxxxxxxxx

I updated content type to derive from workflow task content.
So now my content type id is 0x010801003A026B8335DC724AAA9A3A7D81A12F5B...


这篇关于sharepoint 2010中的createtaskwithcontenttype任务创建错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆