0

My Doc library is major and minor versioning enabled.

I've created SharePoint 2010 workflow for all content types, put there a one single Action "Start Approval(n) process on Current Item with MyUser", changed the Sample5.xoml.wfconfig.xml file with adding:

and in MetaData section:

Manual;#OnNewItem;#OnItemUpdate;#OnMajorCheckIn

But I still cannot check "Start this workflow to approve publishing a major version of an item"

I'm doing all this to create a custom approval workflow but even in simplest form like this main start option is not available for me.

What have I missed?

1 Answer 1

0

Solved with PowerShell. I need to add the workflow first than with PS get it'assosiation ID from WorkflowAssociations lib property than assign this id to DefaultContentApprovalWorkflowId lib property and update the lib. Works.

$web = get-spweb -identity "*Site URL*"
$mylib = $web.Lists["*Library Name*"]
$wa_guid = ($mylib.WorkflowAssociations | where {$_.Name -like *Workflow unique name*}).Id
$mylib.DefaultContentApprovalWorkflowId = $wa_guid
$mylib.Update()
1
  • I would be a pleasure to see this PowerShell code :-)
    – Oskar
    Apr 6, 2018 at 13:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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