vendredi 5 septembre 2014

Remove the default Task Outcomes (Approved rejected)


  • Create a new Task List Instance (new workflow wizard will help you do it)
  • new Custom List Column with type OutcomeChoice

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">  
  <Field
       ID="{a8229356-e367-4379-a6f7-f19fdca45cde}"
       Name="tatatatatata"
       DisplayName="tatatatata"
       Type="OutcomeChoice"
       Required="FALSE"
       Group="Custom Site Columns">

    <CHOICES>
      <CHOICE>very goodt</CHOICE>
      <CHOICE>good</CHOICE>
      <CHOICE>Average</CHOICE>    
      <CHOICE>Bad</CHOICE>
    </CHOICES>
  </Field>
</Elements>


  • new ContentType Inherit from Workflow Task (SharePoint 2013)  (we will edit this later)
  • Add the Custom Column to the contentType
  • from the contentType Element.xml remove this string  003365C4474CAE8C42BCE396314E88E51F
So an ID like:
0x0108003365C4474CAE8C42BCE396314E88E51F00B237734C3B3E48D38A52DAAA52F56A8F  ==> 0x010800B237734C3B3E48D38A52DAAA52F56A

  • Open the file Workflow.xaml with xml editor 
  • find your <p:SingleTask
  • change ContentTypeId to the new id you just modified (0x010800B237734C3B3E48D38A52DAAA52F56A)
  • go to your TaskList instance and Add your contentType:
  <ContentTypeBinding ListUrl="Lists/InterventionList" RootWebOnly="FALSE" ContentTypeId="0x010800B237734C3B3E48D38A52DAAA52F56A" />
  • Deploy your project and see the magic happens
Please leave a comment if you need clarifications


Aucun commentaire:

Enregistrer un commentaire