Solved

deleting document in a view

Posted on 2004-04-30
7
328 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

691 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