3

I have got a problem. When I creating a workflow from the browser the start this workflow to approve publishing a major version of an item is greyed out/disabled. Please help.

2

Turn on "Create major and minor (draft) versions" on document library is definitely a right way to go.

Scenario 1 - Missing value in InitiationType Element Make sure in your workflow definition (workflow.xml) you have included OnMajorCheckIn in <InitiationType>. For example

<MetaData>

    <InitiationType>Manual;#OnNewItem;#OnItemUpdate;#OnMajorCheckIn

    </InitiationType>

</MetaData>

MSDN - "If you do not specify an InitiationType element, Windows SharePoint Services treats the workflow as if the Manual, OnNewItem, and OnItemUpdate values have been specified"

Scenario 2 - The option is enable to you, but you can't select it. Since "major and minor versions" only supported in Document Library. "Start this workflow to approve publishing a major version of an item" option was never meant to work with List. So make sure you only associate your custom workflow to Document Library if you want it to work. If you do it via code, make sure this is how you do it:

SPList _list = _spweb.Lists["Documents"]; 
SPDocumentLibrary docslib = (SPDocumentLibrary)(_list) 
//Add workflow to document lib not list 
docslib.AddWorkflowAssociation(yourWorkflow); 

Why "Start this workflow to approve publishing a major version of an item" option is disabled for my custom workflow in SharePoint?

  • Thanks for replay, but how to add field to have got for all list templates, and all Library. What should I change to have got in all list and library this options ? – Grzegorz Z Mar 23 '15 at 15:25
  • 1
    did you Turn on "Create major and minor (draft) versions" on document library? – Waqas Sarwar MVP Mar 23 '15 at 17:19
  • Yes but in the Custom list it there no this option. Only in document library, and I want to cnow how could i change another template in the list. – Grzegorz Z Mar 24 '15 at 13:25
  • where is the workflow.xml file? – prasadwt Nov 2 '16 at 19:52
  • did you check the your project? msdn.microsoft.com/en-us/library/… – Waqas Sarwar MVP Nov 2 '16 at 19:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.