Reputation: 3329
I want to create state machine workflow using visual studio where on edit of assigned task user should get approve-reject button. Currently I am getting % Completed option.
When I tried to assign task using SharePoint Designer 2013 my edit task was redirected to "_layouts/WrkStat.aspx" page, in which Approve/Reject buttons are there. But when I tried it with visual studio it is redirecting to EditForm.aspx page where I am not getting Approve/Reject buttons.
This is my element file of workflow.
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Workflow
Name="SMW-WF"
Description="Approve Reject Leave Request"
Id="GUID"
CodeBesideClass="SMW.WF.WF"
CodeBesideAssembly="$assemblyname$",
StatusUrl="_layouts/WrkStat.aspx">
<Categories/>
<MetaData>
<AssociateOnActivation>false</AssociateOnActivation>
</MetaData>
</Workflow>
Can anyone guide me how can I redirect my edit task page to _layouts/WrkStat.aspx page or add approve/reject button to editform.aspx page of task.
Thank you. :)
Upvotes: 2
Views: 631
Reputation: 26
Add an application page to the state machine workflow and name it customTaskForm.aspx. You can do all your customization to the task form in here.
Add a content type to workflow project. The parent content type should be Workflow Task(0x0108). The element.xml of content type should be something like this: enter image description here
Note: Replace <> with your workflow project name.
Good luck..
Upvotes: 1