Solved

copying document to a separate DB

Posted on 2000-03-22
9
192 Views
Last Modified: 2013-12-18
Hi Experts,
I have a good question for you. Could you please help me, How to copy a document to a separate database by pressing a single button from the web client before deleting the document permanently.
0
Comment
Question by:skancherla
[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
  • 3
  • 2
  • 2
  • +1
9 Comments
 
LVL 1

Expert Comment

by:stharris
ID: 2646254
skancherla,

This is a rather complicated process, and if you want of the Developers (not me) in this forum to help you out you might want to increase the point.....alot.

St. Harris
0
 
LVL 1

Expert Comment

by:stharris
ID: 2646260
Oops, that was supposed to say Points (not point).  9 'Points' is considered ultra easy!

St. Harris
0
 
LVL 5

Accepted Solution

by:
snocross earned 9 total points
ID: 2646699
1) Have the button set a field on the document:
@SetField("DeleteThis"="Y");@Command([FileSave]);@Command([FileCloseWindow])

2) Create a view called 'Archives'
In the view selection formula put:

DeleteThis = "Y"

3) In the WebQuerySave event call an archive agent

@Command([ToolsRunMacro];"ArchiveAndDelete")

Here's the ArchiveAndDelete agent:

     Dim session As New NotesSession
     Dim db As NotesDatabase
     Dim view As Notesview
     Dim doc As Notesdocument    
     Dim archiveDb As New NotesDatabase( "server1/Acme company", "Web\archdb.nsf" )    
     Set db = session.CurrentDatabase
     Set view = db.GetView("Archives")
     Set doc = view.GetFirstDocument
     
     While Not(doc Is Nothing)
          Call doc.CopyToDatabase( archiveDb )      
          doc.Remove(True)        
          Set doc = view.GetFirstDocument
          REM Set doc = view.GetNextDocument(doc)
     Wend  
0
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!

 
LVL 9

Expert Comment

by:Arunkumar
ID: 2648488
Hi Sanjay !!!

Welcome to EE !
Where are you ?  Send me your contact numbers da.  I called up your old number and heard that you have moved to Chicago !  Is that so ?

Keep me updated...

:)
Arun
0
 

Author Comment

by:skancherla
ID: 2650200
I followed all your instructions and copied your code in the agent and when i tryied to delete the document from the web client, you know it is making a copy in the archive database, thats fantastic!, but after copying it is not deleting the document from the original DB. In the Agent, after making a copy to the Archive DB, i have written the code as Call doc.remove(True). It has to delete the document but it is not deleting. i also checked that i have the manager access to the database with Delete documents option checked.
0
 
LVL 5

Expert Comment

by:snocross
ID: 2650474
Hmmm... it sounds like the document is not fully closed before it's trying to delete it.  In other words it's executing the FileCloseWindow after the WebQuerySave event gets kicked off.  It can't delete it because you still are in it.  Perhaps you could do this:

1) create a new form called DeleteConfirm that contains the following text:  "THE DOCUMENT HAS SUCCESSFULLY BEEN DELETED".  

2) Remove the WebQuerySave event code from your original form

3) Add the code (the @Command([ToolsRunMacro])) to the WebQueryOpen event on the DeleteConfirm form.

4) Change your button so that after you do your @setfield, @FileSave and @FileCloseWindow you open up the new confirmation form.
0
 

Author Comment

by:skancherla
ID: 2661544
it worked! you have helped me at the right time. Thanks very much. Your help is more than appreciation.
0
 

Author Comment

by:skancherla
ID: 2662046
snocross,
I accepted your answer, marked excellent, i gave you 9 points. Did you get it? For me it tells that you have got 0 points though i gave 9 points to you. please let me know how much u got.

you seems to be genius, can i have your email id? i would like to chat with you.

0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 2663651
Hi Sanjay !!!

When you give less than 10 points for a question then 10% of that would be nothing for any person who reads that answer(Anyone can read the answer for free).  

But the excellent grading will give the expert of 9 multiplied by 4 times.  

OK ?  

What happened to my reply to you did you receive it or not ?  Anyway i will call you today at your office da...

-Arun
0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Email Message Background Color 4 155
Lotus notes view not working using Trim 14 215
sending HTML formatted Lotus Notes email using Java 3 168
IBM Domino web server 5 76
You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

734 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