How to disable the feature of making the form editable by double clicking

Hello there,

Is there a way to disable the feature of disabling the feature of making the form editable by double clicking

Subject: RE: How to disable the feature of making the form editable by double clicking

This is a personal preference setting. I suppose you might be able to use the administration process to disable it, but I’m not sure offhand whether it’s stored in an ini setting or what.

Subject: How to disable the feature of making the form editable by double clicking

Are you talking about this feature?

The form will automatically open in Edit mode, no need to double click

JYR

Subject: RE: How to disable the feature of making the form editable by double clicking

No, when i double click on the form, it should not become editable one. Is that possible

Subject: How to disable the feature of making the form editable by double clicking

Handle the queryopen and querymodechange events - set continue=false if you don’t want the thing to contnunue

Subject: RE: How to disable the feature of making the form editable by double clicking

btw…

much better to use authors fields and roles. Don’t use queryopen and modechange events to manage securiy.

Subject: RE: How to disable the feature of making the form editable by double clicking

Hi,

create one hidden field and set that field to 1 when users click on the edit button. and in querymodechange if field is 1 edit the document. and again when closing the document set that to 0 and save the document.

one thing i want to say is if the user clicks on the edit button their name will come in modified by field, if they dont do any modification in document ( just clicked on edit and closed the document).if you dont want this to happen, this will not be useful.

Edit button

Sub Click(Source As Button)

Dim ws As New NotesUIWorkspace

Dim doc As NotesDocument

Set doc=ws.CurrentDocument.Document

doc.editable="1"

doc.Save True,False

ws.CurrentDocument.EditMode=True

End Sub

Sub Querymodechange(Source As Notesuidocument, Continue As Variant)

If Source.Document.editable(0)="1" Then

	continue=True

Else

	continue=False

End If

End Sub

Sub Queryclose(Source As Notesuidocument, Continue As Variant)

If source.EditMode=True Then 

	source.Document.editable="0"

	source.Document.Save True,False

End If

End Sub

Subject: RE: How to disable the feature of making the form editable by double clicking

Hi,

Check this solution is very simple.

  1. Declare one variable in form “Globals”.

    Ex:Dim EditClick As String

  2. Initialize the variable …

    Sub Initialize

    EditClick=“NO”

    End Sub

  3. Add the following code in Querymodechange of form event…

Sub Querymodechange(Source As Notesuidocument, Continue As Variant)

If EditClick="YES" Then

	'Edit the Document  when you click on the "Edit Action"

Else

	'Dont Edit the Document  when you Docuble click on the Document

	Continue=False

End If

End Sub

Thanks,

Sreedhar

Subject: How to disable the feature of making the form editable by double clicking

From the view, Create an “Edit Document” action button in your view and use this formula:

@SetEnvironment(“Allow_Edit”; “YES”);

@PostedCommand([EditDocument]; “1”)

In the view’s QuerypenDocument event use this code:

Dim ns As New NotesSession

canedit$ = ns.GetEnvironmentString("Allow_Edit", False)

If canedit$ = "YES" Then

	Continue = True

Else 

	Continue = False

End If

Call ns.SetEnvironmentVar("Allow_Edit", "NO", False)

Or from within the document use the same edit button in an action and place the other code in the form’s QueryOpen event. Unlike the previous solution, it’s not necessary to set a field on the document.