issue in taskform as customcontenttype in custom workflow
-
Friday, March 16, 2012 8:35 AM
hi,
am having a sequential workflow SP 2010/VS 2010/sequential workflow with custom aspx for as task forms.
my workflow is in progress and i have assigned to a person in the below code .am checking for content types are assocaiated with the tasks and checked the "allow mgmnt of content types" for both workflow tasks list and my custom splist.
my issue is am not navigating/redirecting to the aspx form<task form> when i click on the title <<manager approval>> in the workflow tasks list, instead i am getting the default content type page.
when i click on the title column--> "manager approval " in the sites/workflowtasks/allitems.aspx page i am getting the default sites/sitename/workflowtasks/dispform.aspx page instead redirecting to my custo appln page /_layouts/TESTINGSEQWORKFLOW/IDEAManagerApproveForm.aspx
i think i should be redirecting to the page when i click on the manager approve title in the workflow tasks list. thats not happening now.
any one knows why this is not redirecting.
private void createTaskforanager_MethodInvoking(object sender, EventArgs e)
{
try
{
if (oSPListItem["ManagerName"] != null && !string.IsNullOrEmpty(oSPListItem["ManagerName"].ToString()))
{
createTaskWithContentType1_TaskProperties1.AssignedTo = "domainname\\myloginname";
}plz help me what am missing here?any changes need to be made in the elements.xml file where the <workflow ...> and <contentype > elements mentioned.
belwo is my elements.xml file , when the seq. workflow is created and i have updated with customcontent type:
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<ContentType ID="0x010801004BC1B46FD0F745BD919CED7F9B231417"
Name="TestingSEQIDEAWF_CustContentType_NEW"
Group="TESTINGIDEAWF_Approve_CustContentTypes"
Description="TESTINGOFIDEAAPPROVALL_CustContentTypeforIDEAWFF"
Inherits="TRUE"
Version="0">
<FieldRefs>
</FieldRefs>
<XmlDocuments>
<XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">
<FormUrls xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">
<Edit>_layouts/TESTINGSEQWORKFLOW/IDEAManagerApproveForm.aspx</Edit>
<Display>_layouts/TESTINGSEQWORKFLOW/IDEAManagerApproveForm.aspx</Display>
</FormUrls>
</XmlDocument>
</XmlDocuments>
</ContentType>
<Workflow
Name="TestingSeqWF"
Description="TestingSEQWorkflow"
Id="612576d5-dccb-4cfb-8fd6-475fc90bc2dc"
CodeBesideClass="TestingWorkflow.TestingSeqWorkflow.TestingSeqWorkflow"
CodeBesideAssembly="$assemblyname$">
<Categories/>
<MetaData>
<AssociationCategories>List</AssociationCategories>
<!-- Tags to specify InfoPath forms for the workflow; delete tags for forms that you do not have -->
<!--<Association_FormURN>[URN FOR ASSOCIATION FORM]</Association_FormURN>
<Instantiation_FormURN>[URN FOR INSTANTIATION FORM]</Instantiation_FormURN>
<Task0_FormURN>[URN FOR TASK (type 0) FORM]</Task0_FormURN>
<Task1_FormURN>[URN FOR TASK (type 1) FORM]</Task1_FormURN>-->
<!-- Modification forms: create a unique guid for each modification form -->
<!--<Modification_[UNIQUE GUID]_FormURN>[URN FOR MODIFICATION FORM]</Modification_[UNIQUE GUID]_FormURN>
<Modification_[UNIQUE GUID]_Name>[NAME OF MODIFICATION TO BE DISPLAYED AS A LINK ON WORKFLOW STATUS PAGE</Modification_[UNIQUE GUID]_Name>
-->
<StatusPageUrl>_layouts/WrkStat.aspx</StatusPageUrl>
</MetaData>
</Workflow>
</Elements>
shankar
- Edited by Shankardas Friday, March 16, 2012 8:43 AM detailed
All Replies
-
Wednesday, March 21, 2012 10:55 AMModerator
Hi Shankardas,
First, please check your CreateTaskWithContentType activity, bond TaskId with task ID, ContentTypeId with task content type id.
Then in the _MethodInvoking() event, verify whether the content type is existing, you can following the link below to check:
http://thorprojects.com/blog/archive/2007/01/24/a-few-things-you-should-know-about-createtaskwithcontenttype-in-sharepoint-workflow.aspxMore information, Workflow Task Forms (SharePoint Foundation):
http://msdn.microsoft.com/en-us/library/ms438856.aspxThanks,
QiaoQiao Wei
TechNet Community Support
- Marked As Answer by Qiao WeiMicrosoft Contingent Staff, Moderator Monday, March 26, 2012 10:07 AM

