how to modify and save locked locked content

Posted by zb4918294 on 22-Aug-2019 19:57

Hello everyone. 

I was trying to modify and save locked content but it keeps failing . 

I found 

 dynamicModuleManager.Provider.SuppressSecurityChecks = true;

but it doesn't seem to be overriding the locked part. 

dynamicModuleManager.Provider.SuppressSecurityChecks = true; DynamicContent paperItem = (DynamicContent)dynamicModuleManager.Lifecycle.CheckOut(self); // do stuff paperItem.SetWorkflowStatus(dynamicModuleManager.Provider.ApplicationName, "Published", null); DynamicContent checkedin = (DynamicContent)dynamicModuleManager.Lifecycle.CheckIn(paperItem); versionManager.CreateVersion(checkedin, true); dynamicModuleManager.Lifecycle.Publish(checkedin); TransactionManager.FlushTransaction(transactionName);

above is how i an checking things out , modifying them, creating a version , checking them in and publishing them

Any ideas would be very helpfull

Thanks

All Replies

Posted by Eduardo Añíbarro on 23-Aug-2019 04:52

Hi, try to unlock the item first by removing the temporary copies like this and save changes:

dynamicModuleManager.Lifecycle.DiscardAllTemps(paperItem);

Modifying a locked item could be problematic...

This thread is closed