Set Workflow using Item Buckets Search Operations
Recently one of our clients asked to set the workflow on large number of items that were created without workflow, so i was thinking of writing a script on powershell to do that, but then i thought why not extend Item buckets Search operation and add "Set Workflow" option there!
Basically, You will need to write a command that sets the workflow for all items in search results, and register that command.
1- The Code:
2- The Configurations:
3- Adding Command item in Sitecore:
The Result!
Basically, You will need to write a command that sets the workflow for all items in search results, and register that command.
1- The Code:
2- The Configurations:
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> <sitecore> <commands> <command name="bucket:setworkflow" type="Sitecore.SharedSource.Buckets.SearchOperations.SetWorkflow, Sitecore.SharedSource.Buckets.SearchOperations"/> </commands> </sitecore> </configuration>
3- Adding Command item in Sitecore:
- Open Content Editor and go to "/sitecore/system/Settings/Buckets/Settings/Search Operations/Fields"
- Create new item of Template "/sitecore/templates/System/Item Buckets/Dropdown List", name it "Set Workflow".
- In "Type" field, enter "bucket:setworkflow" and in "List Name" field, enter "Set Workflow", and choose a proper icon for that item :) .
The Result!
Comments
Post a Comment