How to get last comment from version history in custom workflow handler

Martin Dobsicek asked on January 23, 2010 12:10

How to get last comment from version history in custom workflow handler

Correct Answer

Martin Dobsicek answered on January 23, 2010 12:10

You can use sample code bellow:

CMS.TreeEngine.TreeNode node = treeNodeObj as CMS.TreeEngine.TreeNode;
int documentCheckedOutVersionHistoryID = node.DocumentCheckedOutVersionHistoryID;
CMS.WorkflowEngine.VersionHistoryInfo whi = CMS.WorkflowEngine.VersionHistoryInfoProvider.GetVersionHistoryInfo(documentCheckedOutVersionHistoryID);
string comment = whi.VersionComment;

0 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.