Hello,
We have made a simple intranet/internet application to plot documents saved in the EPDM vault.
Is it possible to get the previous 'Approved' revision of a document via API?
Code:
Dim search As IEdmSearch5 = vault.CreateSearch
search.AddVariable("DocumentNumber", _DocumentNumber)
search.FileName = "%." & _extension
Dim result As IEdmSearchResult5 = search.GetFirstResult
While Not result Is Nothing
If result.StateName = "Approved" Then
'do the plot things
else
'return wrong status to user - no plot done
msg = result.StateName
'But, I want to plot the previous revision of a document
'notify on the plotted document that this document is under change
end if
Geir,
Do you assign a Vault Revision to each file that enters the 'Approved' state?
If so the follow code will find all of the version with Revisions assigned(note it is messy and will need some updating for use in your code):
Then you can use IEdm5::GetFileCopy to specify the revision you want.
Corey V