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:
<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

  1. But the impact of a gambling addiction is in full view of chapter lawyers. The market has been segmented into casinos, sports activities betting, bingo, poker, and others, with the sports activities betting section, dominating the market with a revenue share of roughly 50% in 메리트카지노 2021. Rising reputation of sports activities betting gambling on video games similar to soccer, and casino, coupled with elevated web penetration, has fueled the market progress in Europe.

    ReplyDelete

Post a Comment

Popular posts from this blog

Building Sitecore Content Search Queryable using Rules engine

Attaching a file on WFFM Send email action

Caching Rendering HTML when conditional rules are applied