uidoc.EditMode = True in different environments

I copied a database from a production environment to a development environment. Our notes admins insist they are the same.It is a simple enough application. User creates form and sends for approval. Manager approves ( button on form ), then other user does what the request asked and they too have a button to say it has been done.

The documents are opened in read. Every button has a uidoc.EditMode = True ( see below ). This statement causes the error “Document has been modified since opening, reopen in edit mode from view”.

If indeed I do open the document with a ctrl/E, the approve button works.

This works in production without the crtl/E but not in test environment.

code…

Sub Click(Source As Button)

'***************************************

'*APPROVE BUTTON

'***************************************

'* Notes Objects

'***************************************

Dim s As New NotesSession     

Dim w As NotesUIWorkspace     

Dim db As NotesDatabase

Dim db1 As NotesDatabase

Dim currentdb As NotesDatabase

Dim view1 As NotesView

Dim uidoc As NotesUIDocument

Dim doc As NotesDocument

Dim notesdate As New NotesDateTime("")

Dim acl As NotesACL

Dim aclentry As NotesACLEntry



	

 '***************************************************

 '* Set Notes Objects

 	Set currentdb = s.CurrentDatabase

Set w = New NotesUIWorkspace

Set uidoc = w.currentdocument

Set doc = uidoc.Document

Call notesdate.setnow

Set acl = currentdb.ACL

 

uidoc.EditMode = True   FAILS HERE!!!!

Exitflag = "NO"

Found = "FALSE" 

I feel like I am losing it…

Subject: uidoc.EditMode = True in different environments

If it works in prod but not in test, then the problem is not the code… Check the db properties on the test server and on the prod server to make sure they are the same… (check the Advanced options). I can’t see what else it could be, the code seems fine to me but I’m no expert…

Subject: RE uidoc.EditMode = True in different environments

Anything in the postopen (or querymodechange, not sure if applicable…) of form or subforms, that may give different results in prod and dev ?