Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

running an agent from a different database

Posted on 2004-10-27
6
Medium Priority
?
1,676 Views
Last Modified: 2013-12-18
Hi, I need to run an agent of a database from another database.

I mean, In database A i've a button in one of its view and when it is clicked, it should run an agent from database B.

Lets say I've an agent in Database B. The normal formula to run this is
@Command([ToolsRunMacro];"(agent)")

But I want to run this agent by clicking a button in Database A.

thanks
sri
0
Comment
Question by:sridevi911
[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
6 Comments
 
LVL 15

Assisted Solution

by:Bozzie4
Bozzie4 earned 200 total points
ID: 12431662
You can't in Formula, but you can using script .  Put this in your Lotusscript - button area.

Dim s As New NotesSession
  Dim db As NotesDatabase
dim otherdb as notesdatabase
  Dim agent As NotesAgent
  Set db = s.CurrentDatabase
set otherdb = s.getdatabase( db.server , "OTHERDB.NSF" )
  Set agent = otherdb.GetAgent("(agent)")
  If agent.Run = 0 Then
    Messagebox "Agent ran",, "Success"
  Else
    Messagebox "Agent did not run",, "Failure"
  End If
0
 
LVL 3

Expert Comment

by:Andrea Ercolino
ID: 12433464
in Notes 6:

@Command( [FileOpenDatabase]; server : database );
@UpdateFormulaContext;
@Command( [RunAgent]; AgentName );
@Command([CloseWindow])
0
 

Author Comment

by:sridevi911
ID: 12433980
bozzie,

I get an error at the following :

Set otherdb = s.getdatabase( db.APPS01/SIVX , "apps2/cust.nsf" )

how do i specify the server part?


Raputa,
There are many users who have R5. so if the above only works on R6 then it would be a problem

thanks
0
Independent Software Vendors: 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 3

Expert Comment

by:Andrea Ercolino
ID: 12434176
Yes, my solution works only for at least Notes 6...
Then you should do as Bozzie4 said.
0
 
LVL 2

Accepted Solution

by:
kalios earned 200 total points
ID: 12434209
You have to code it like this

Set otherDB = New NotesDatabase(otherdbserver, otherdbpath).


This should work fine.

Kalios
0
 

Author Comment

by:sridevi911
ID: 12434262
kalios.. works fine. thanks
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

618 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