Solved

edit and delete commands in view

Posted on 2004-04-27
16
419 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
  • 9
  • 3
  • 2
  • +2
16 Comments
 
LVL 19

Expert Comment

by:RanjeetRain
Comment Utility
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
Comment Utility
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
Comment Utility
Hi Ranjeet,
do u have any CRM full specs? or Sales Force?
0
 

Author Comment

by:emem
Comment Utility
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
Comment Utility
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 50 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 31

Expert Comment

by:qwaletee
Comment Utility
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
Comment Utility
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
Comment Utility
Nothing great. Just change the form formulae for that view!
0
 
LVL 19

Expert Comment

by:RanjeetRain
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

  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…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

728 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

13 Experts available now in Live!

Get 1:1 Help Now