how to modify and save locked locked content - General Discussions - General Discussions - Progress Community
 General Discussions

how to modify and save locked locked content

  • 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

  • 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...