Programming a Button

Tags:
Lotus Domino
LotusScript
Microsoft Exchange
Platform Issues
Programming Languages
I am currently running a Domino/Notes R6 messaging environment. I am trying to create a button that will delete a database from the users local client and from their Workspace and then create a local replica of a database that resides on their mail server to thier Workspace. All in one button, if possible. Your help is much appreciated. Thanks in advance.
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

I have never done what you are asking to do but can provide some direction. First off, this looks like something that will need to be scripted as opposed to using functions. There is a function, @Command([FileDatabaseDelete]) that will delete the current database if the user has delete privileges. There is also a CreateCopy method in Lotus Script that will make a copy of a database, but not the contents. What I have found in the past is that generally if there is a function then there is a method and the reverse holds true. Unfortunately you cannot mix functions and methods. I suggest finding the method that is equivalent to the delete function, that is part one. Look for a method that will copy a database and its contents and if there isn’t one then use the CreateCopy method to create the database and a method to copy all records or write all records from the database on the server to the one on the local PC.

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • GreatPretender
    The best way I know of might be to create an Action Bar button in the Domino Designer, and then use it to call code in a C++ DLL that uses the C++ API (using LotusScript). Use the example code that comes with the C++ API to pass a Note handle to the DLL, and then you can get the database, copy it, and do whatever else you want to do with it. The example code is titled something like "Calling C++ from LotusScript".
    0 pointsBadges:
    report
  • Tjmoore
    This thread might help you... http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/ca353d06d4ca22ba8525703f0050ad16?OpenDocument
    0 pointsBadges:
    report
  • BHawthorne
    The functionality you need is easily available. @Commands should let you accomplish it all, and the code in the suggested thread gets you most of the way. All you need to do is add in the FileNewReplica command. There are number of ways you can get the function to the user, depending on your needs. The simplest, if your environment will allow, and you can rely on users to click it, is a button in the body of an email. Other options would be code on a database page that you send users a link to, modifying the mail template (usually hard to get done), etc.
    0 pointsBadges:
    report
  • MHanson
    One heads-up - your code will generate an ECL warning to each user as you are doing an action that is generally highly restricted (deleting fileson the workstation). The tip from BHawthorne is accurate, you can do what you want using @Functions. Script would give you a bit more ability to do this quietly and examine more about the user's environemnt.
    35 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: