Is there a way to capture the transition comment within the API or better yet, without the API? Here is my scenario.
User A sends a document from workflow state 1 to state 2
the user login is stored in the SubmitterEmail variable on the card
User B decides a change needs to be made and send the document back to state 1
my addin runs prestate change and sends an email to User A using the SubmitterEmail variable
SubmitterEmail is then cleared by the transition
I'd like the User B's comments from the transition of state 2 to 1 to be included in the email, but I'm not finding a way to capture this data.
Any suggestions?
You can get the transition comment through the EdmHistory object.
This snippet shows all transition comments for objFile:
Dim objHistory as IEdmHistory
objHistory = objVault.CreateUtility(EdmUtility.EdmUtil_History)
objHistory.AddFile(objFile.ID)
Dim ppoHistory() As EdmHistoryItem 'this array will hold all transition information
objHistory.GetHistory(ppoHistory, EdmHistoryType.Edmhist_FileState)
For intCounter = 0 To UBound(ppoHistory)
ppoHistory(intCounter).mbsComment 'Comment
Next Counter