Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

deleting document in a view

Posted on 2004-04-30
7
Medium Priority
?
330 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 1000 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 1000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

609 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