?
Solved

edit and delete commands in view

Posted on 2004-04-27
16
Medium Priority
?
426 Views
Last Modified: 2013-12-18
How do I prevent the user to edit a document/record by double clicking on it in the view? and how come my delete command in my action button does soft deletion only it does not delete the document permanently from the database.  I created a view with all my records displayed and I created 2 action buttons namely Mark record for deletion with this formula @Command([EditClear]) whichs marks the record and a button named Delete Entries with this formula @Command([EmptyTrash]);
@Command ([Refresh]) but these only hides the record when I press F9 thats the time that the records are deletedly permanently.

Hope somebody can help .......
0
Comment
Question by:emem
[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
  • 9
  • 3
  • 2
  • +2
16 Comments
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 10936166
Toprevent editing there are many methods that can be used. The most secure method is to use Authors field. Have an Author field in the document and assign it the names of poeple who should be allowed to edit it. If you have no name in the field no one will be able to edit the document.

Second method is, to handle the QuerryModeChange event. Set the argument Continue to FALSE and the document editing will be prevented.

Both these methods have their pros and cons. Try them and see what is bestb in your scenario.


0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 10936182
About the deletion, see if you have enabled Allow Soft Deletion property. Check the database properties and tweak this value. That will most liekly sort out your issue.

If not, then write a LotusScript agent which will excute a REMOVE on the NOTESDOCUMENT object. THat does a hard-delete.

0
 
LVL 19

Expert Comment

by:madheeswar
ID: 10936195
Hi Ranjeet,
do u have any CRM full specs? or Sales Force?
0
Industry Leaders: 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!

 

Author Comment

by:emem
ID: 10936220
with the prevention of editing wat i want to do is when a view is displayed and then user double clicks on a record it will not allow the user to view it in a form view nothing will happen...

with the deletion i'll check on your suggestion
0
 
LVL 19

Expert Comment

by:madheeswar
ID: 10936267
U can write a script code in Postopen of view

or when double clisk event. u can manage in a way that only database administrators can edit it.
0
 
LVL 15

Accepted Solution

by:
Bozzie4 earned 150 total points
ID: 10937184
Put this in the Queryopendocument event of the view :

Continue = False

If you want this to work when you use a button, you'll have to add logic (like setting an environment variable when the button is clicked, and checking the env. var. (if it's checked, continue = true )

cheers,

Tom
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 10937537
emem, I'd say  you'll be inviting trouble by disabling documents from being opened from views. How then do you think you will let the user open the documents???? With flags??? It is possible, but I don't think you should go ahead with that. WHat is the scenario for which you want a document to not be open from a view? May be you should change your UI logic. Otherwise, be sure to have flag. Simplest of the way is to set the Continue argument in relevent event (in this case QueryOpenDocument) to FALSE.
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 10937556
Mady,

CRM is a big thing. What exactly are you looking for? Tell me and may be I can help. Sales force?!?!?!? Yeah... Im soon gonna open a company of mine which will specialize in developing CRM solutions for small-medium size businesses. Then I will need sales force... LOL!
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 10942190
EditCut work svery nicely for situations where Notes gets confsed whether you want to do a copy-to-trash, move-to-trash, immediate clear, or soft delete.  Be careful when you use the phrase "soft deletion," as it is a technical term in Notes, and I don't know whether you mean "the Notes function for Soft Delete" or "a delete where the document is still available but has nothing to do with the Notes soft delete feature."
0
 

Author Comment

by:emem
ID: 10944981
I just want the users to view the documents in that particular view .....but they can edit that particular record in a different view but not in that particular view ...that particular view I just want it to display the records simply displaying the records only no double clicking on a particular record to edit it =)
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 10946544
Nothing great. Just change the form formulae for that view!
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 10946601
Okay, I will elaborate.

When you are designing a view, usually you specify only its selection formula. But right below the selection formula there is something called "Form Formula". This is optional, but if you specify a form formula then when a user opens a document from the view, it is this form that is used, which is normally not the case. Under normal circumstances, its the value stored in a field called FORM that is used. The solution is your case is:

1). Create an alternate form for the documents that you want to display in read only mode. You can just copy + paste the same form (original form) and rename it to something like FORM_READONLY. Now, open the form and add this line to its QueryModeChange event.

       Continue = False

2). Now open the view you want to use as a read only view and specify the readonly form name as its Form Formula.

0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 10948061
emem, its funny how you decided which comment to choose as an answer. If the comment you chose as an answer was acceptable to you then your last comment was not required, you must have closed the question at that. If your queries were answered by the comments which were added later or prior to that, you should have been careful about chosing a comment/comment(s) as an answer.

I doubt you have understood what you required to do to solve your problem.
0
 
LVL 19

Expert Comment

by:madheeswar
ID: 10948106
Ranjeet,
Cool down man. I have sent u mail and till now there is no response.

And as per I know, emem is new to Notes.

Emem,
You should consider Ranjeet efforts also. he spent time to answer you and he deserves some points.

Try to open a new question (Points to ranjeet as the subject) and award points to Ranjeet.
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 10948536
Mady,

Its not about points. I don't want points. They are not as important for me as is the spirit with which we come here. What you post here becomes a part of history. Think of it, tomorrow many people might read this thread after having found it in a search. Imagine the lesson they will learn!!! The prevention of opening in this scenario was not merely a question of setting continue to false in queryopen... it was more dependent on the form selection formula for the view. In future the message that goes out to readers will be totally wrong (untill the reader uses his own grey cells). Besides, there were two parts of the problem. emem, failed to recognize the efforts put in by people to help in solve the deletion part of the problem. I just wanted to advise emem to be more careful about his/her decesion making, that's all.

Thanks for your support though!
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 10948548
Sorry Mady, was busy in a meeting (sigh, nothing better to do. 3 hrs gone). Will reply you in the night when check mail from home.
0

Featured Post

Industry Leaders: 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

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
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…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses
Course of the Month7 days, 20 hours left to enroll

765 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