Thursday, 29 October 2015

How to remove item's Workflow& WorkflowState programmatically?

using ( new SecurityDisabler() )
{
Item.Editing.BeginEdit();

Item["__workflow"] = string.Empty;
Item["__workflow state"] = string.Empty;
Item["__lock"] = "<r />";
Item["__default workflow"] = string.Empty;

Sitecore.Context.Item.Editing.EndEdit();
}

No comments:

Post a Comment

Featured post

Getting Started With SOLR

Getting Started with Solr ·           Features o    Hit highlighting o    Auto correction o    Faceted Search o    Multi lan...