When we create a new workflow and apply it to templates, then this newly created workflow will be applied only to newly created items.
But the already existing item will not be affected. Because Sitecore never changes existing items by itself.
To apply the new workflow to existing items We can use the Powershell script.
In this script add the location after "$contentsToUpdate = Get-Item master: -Query" to apply workflow likewise in my case all items under the home will be updated to the new workflow.
In "$content.Fields["__Default workflow"].Value" and "$content.Fields["__Workflow"].Value" add your workflow Item Id.
In "$content.Fields["__Workflow state"].Value" add your workflow default status Id.
When the Script runs successfully it returns the "True" value for each item and the workflow will apply to all items otherwise it returns the "False" value.
Cloud-based eCommerce platforms are the most in demand right now. The global retail sales increased approximately to USD 4.2 trillion during the pandemic. The share of eCommerce as of 2021 globally in the total retail sales is 21%.Read More