I am currently using SharePoint Online and creating SharePoint 2013 workflow using SharePoint Hosted App project in Visual Studio 2015.
My scenario is I want to create tasks at different stages and assign to different people, however each task is going to have different fields to input. Thus, I need to have custom task forms.
I can't use SharePoint designer as it is SharePoint App (Add-in).
When I was using On-Premise SharePoint 2010 workflow, I used to create different content types with Inherit="FALSE" and provide custom forms in XMLDocument tag which worked perfectly.
However, when I use below code for Content type which use Parent ContentType as Workflow Task (SharePoint 2013), it doesn't create task properly when you set Inherit='FALSE'. Workflow status page shows error in Tasks section stating 'One or more field types are not installed properly'.
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<!-- Parent ContentType: Workflow Task (SharePoint 2013) (0x0108003365C4474CAE8C42BCE396314E88E51F) -->
<ContentType ID="0x0108003365C4474CAE8C42BCE396314E88E51F0021934DF646F443608A44B2195BFFFADA"
Name="ctTestNewDemoApp5" Group="Custom Content Types"
Description="My Content Type" Inherits="TRUE" Version="0">
<FieldRefs>
<FieldRef ID="{06b88e60-36e5-419a-916f-69ab0dad77af}" DisplayName="Employee Name" Name="empName" />
</FieldRefs>
<XmlDocuments>
<XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">
<FormUrls xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">
<Display>Pages/Default.aspx?action=display</Display>
<Edit>Pages/Default.aspx?action=edit</Edit>
<New>Pages/Default.aspx?action=new</New>
</FormUrls>
</XmlDocument>
</XmlDocuments>
</ContentType>
</Elements>
Can we create custom 'Task forms' for new/edit/display purposes using Visual Studio? Please suggest.
Thank you, Sagar S.