Document Versioning

I have surfed this forum for years and have always found the answers I need in the posts, but this time I’ve come up empty handed.

I’d like to use the versioning functionality (in document properties) on the web, however I have been unsuccessful in making this happen. The closest answer I found in the forum was that it is indeed possible to do this, however you need to define some specific fields on your form and to see the help documentation for more information. I have searched help through and through and cannot find anything related to using that functionality on the web.

Does anyone know if it is possible and if not, any alternatives? I’m simply trying to save a form in its previous state each time it is modified (when a user presses a ‘calculate’ button) on the web.

Thanks!

Chris

Subject: Resolved

Turns out I was just making it more difficult than necessary. Just call an agent in webquerysave and use the CopyToDatabase() and MakeResponse() methods:

Dim session As New NotesSession

Dim db As NotesDatabase

Dim requestDoc As NotesDocument

Dim newVersionDoc As NotesDocument

Dim existingVersion As Integer

Dim newVersion As Integer

Set db=session.currentdatabase

Set requestDoc = session.DocumentContext

'Update version number

existingVersion = requestDoc.VersionNumber(0)

newVersion = existingVersion + 1

'Create subsequent versions of the document every time the document is saved:

Set newVersionDoc = requestDoc.CopyToDatabase(db)

Call newVersionDoc.MakeResponse( requestDoc )

Call newVersionDoc.Save( True, True )

requestDoc.versionNumber = newVersion