简体   繁体   中英

Using the default approval workflow task form in a custom Visual Studio Workflow

I am making a custom approval workflow in VS, but I dont wan to create a custom infoPah form to create the task edit form. Is there any way to use the form that comes with the OOTB approval workflow??

Thanks

You should try to specify the URN of OOTB InfoPath form in Elements.xml of your workflow solution.

Example:

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Workflow
 Name="WorkflowProject1 - Workflow1"
 Description="My SharePoint Workflow"
 Id="1ac59aff-6d65-4e7c-9dc1-e84e7cbc6b3a"
 CodeBesideClass="WorkflowProject1.Workflow1.Workflow1"
 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:schemas-microsoft-com:office:infopath:workflowInitAssoc:-AutoGen-2009-07-30T07:17:57:12Z:1033</Task0_FormURN><!--
  <Task1_FormURN>[URN FOR TASK (type 0) 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>

You can check installed InfoPath Templates in Central Administration > General Application Settings > Manage Form Templates > when you click on template you could see the form URN.

Hope it helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM