Solved

deleting document in a view

Posted on 2004-04-30
7
321 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

708 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now