Good morning.
We have the following issue.
We have a tree node object (custom doc type), we update its fields and try to persist changes to DB. Doc type is configured for autopublishing changes.
Here is the code example.
TreeProvider tree = new TreeProvider(SecurityContext.Current.User);
TreeNode claimNode = DocumentHelper.GetDocument(claim.NodeID, CMSContext.CurrentDocumentCulture.CultureCode, tree);
// update fields code.....
DocumentHelper.UpdateDocument(claimNode, tree);
// also we tried the following code to update and publish
// Option1. - claimNode.Update();
// Publish node
// Option2. - claimNode.MoveToNextStep(string.Empty);
// Option3. - WorkflowManager workflowManager = WorkflowManager.GetInstance(tree);
WorkflowInfo workflow = workflowManager.GetNodeWorkflow(node);
// Check if the document uses workflow
if (workflow != null)
{
workflowManager.PublishDocument(node, null);
}
Each of these attempts does not result in updating custom doc type table. The changes are reflected in the CMSDesk (there we have new values and it says that document workflow step is PUBLISHED) and even in the TreeNode object, but not in the database.
Have can we ensure that changes are populated to the custom doc type table?