Manage Learn to apply best practices and optimize your operations.

Forcing The User To Use Edit Button For Editing A Document.

This feature is used to restrict the user from double clcikng to edit a
document.
Create a hidden field "dc" with default value "1"

In Form Declarations
Dim s As NotesSession
Dim w As NotesUIWorkspace
Dim doc As NotesUIDocument
Dim db As NotesDatabase
Dim note As NotesDocument
Dim tempnote As NotesDocument

1.Use this code in Form Querymodechange .
Sub Querymodechange(Source As Notesuidocument, Continue As Variant)

Set w = New NotesUIWorkspace
Set s = New NotesSession
Set db = s.CurrentDatabase
Set note = source.Document

If note.dc(0)="1" Then
Msgbox "Please Click the Edit Button"
continue=False
Else
continue=True
End If
End Sub

2.Use this code in Querysave Event.

Sub Querysave(Source As Notesuidocument, Continue As Variant)
Set w = New NotesUIWorkspace
Set s = New NotesSession
Set db = s.CurrentDatabase
Set note = source.Document
note.dc="1"
note.save True, True
End Sub

3.For Edit Action Button;

@SetField("dc";"2");
@Command([ViewRefreshFields]) ;
@PostedCommand([FileSave]);
Test := @DocumentUniqueID;
@PostedCommand([FileCloseWindow]) ;
@PostedCommand([FileOpenDatabase]; "" : ""; "2");
@PostedCommand([OpenDocument];"1";@Text(Test);0:0)

Dig Deeper on Lotus Notes Domino Administration Tools

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close