Solved

deleting document in a view

Posted on 2004-04-30
7
324 Views
Last Modified: 2013-12-18
hi experts,

i have a view that contain all of documents, i  have a move to trash button that deleted selected document and the document will move to trash view it works fine.

the problem is how can i avoid user by simply clicking  the delete key on the keyboard or by clicking the right button of the mouse and selecting delete or cut option I want them to delete the seleted document by clicking the move to trash buton and if they click the delete key on the key board or using the right click button of the mouse message will promt Telling "Pls use the MOve to trash butoon to delete"  

thank in advance,
love

0
Comment
Question by:lovemeto
7 Comments
 
LVL 46

Accepted Solution

by:
Sjef Bosman earned 250 total points
ID: 10966776
What you should implement is the "soft" deletion, that's possible in R6 (I don't know to what extent in R5). Please open the design of the mail database or template, and see how it is done there. Your Move to Trash-button should be function exactly like the Del-key, and not the other way round.

Check the Designer Help db, Index, look under Soft deletions.
0
 
LVL 15

Assisted Solution

by:Bozzie4
Bozzie4 earned 250 total points
ID: 10967037
You can use the QueryDocumentDelete database event to do that

put

msgbox "Deleting documents is forbidden ... "
continue = false

cheers,

Tom
0
 
LVL 14

Expert Comment

by:p_partha
ID: 10969869
On the button, just set the value of a field to :

buttonclicked:="true"


and as bozzie said use querydocumentdelete and write this code:

if buttonclicked <> "true" then
msgbox "Pls come via the trash button"

continue  =false
end if
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 10971007
As always there are ten different methods to do something in Notes. I think that just disabling the Delete-key for document deletion is a poor man's solution. The user already knows all about deleting documents in his mail-file. This standard method to remove documents is suddenly disabled, in favour of some "clumsy" button on the screen. Second-choice approach.

First choice to me still is to enable soft deletions: supported entirely by Notes, changes Modified-time but probably doesn't add a name to $UpdatedBy. Yes, indeed, it requires more understanding and maybe some different coding, but it's standard and close to normal behaviour.

So, if you need a quicky, go for disabling the key, but if you want a good solution, go for soft deletions.
0
 
LVL 1

Expert Comment

by:yoshi78
ID: 10981663
Here's some code I throw into Database Resources -> Database Script -> QueryDocumentDelete() to prevent deletion.

Sub Querydocumentdelete(Source As Notesuidatabase, Continue As Variant)
     Continue = false      
     Messagebox "Deletion is not allowed",,"Notice!"
End Sub

You can test certain fields or roles or anything else for that matter here if you have requirements
HTH,
Yoshi
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question