Posts

Showing posts with the label Workflow

Set Workflow using Item Buckets Search Operations

Image
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: <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/Fiel...

Apply changes to cloned items immedialtley using Sitecore Workflow

Image
Intoduction Sitecore Cloning items is new feature in 6.4 version, it give the ability to reuse same item content in different places in your site, clone item is an actual item that points to another item called origin, and hold the same field's data as the origin. For more information on clone items, read this document . The Problem Creating new version of origin item, will push a UI notification  for user to accept the new change on every cloned item, this could be time wasting for some people if they want these changes to be reflected immediately. The Solution Using Sitecore workflow actions, we can enforce origin item new version changes to be reflected on all clone items. Note : You should notice in code snippets below that states IDs and Commands ID are hard coded here to use Sitecore Sample Workflow, if you plan to use your own workflow, you will need to change these IDs as fit.   1- Origin item template should use Sitecore sample workflow. 2-...