Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Agent called from another agent problem

Status
Not open for further replies.

iwantout

Programmer
Oct 31, 2005
3
US
Both agents are on the same server.
Each agent is in a different db on the same server

First agent calls the second one:
Dim LeaseDB As New NotesDatabase ("CMNotes1","Leasing\LeasingT.nsf")<<-- this does get set and isopen

Dim agent As NotesAgent
Dim status As Integer

Set agent = LeaseDB.GetAgent("Generate and Update Lease Info") <<--- this never gets set and the agent exists, ive also tried the alias

status = agent.RunOnServer
If status = 0 Then
Msgbox "Agent Ran Successfully"
Else
Msgbox "Agent Failed"
End If
 
I do want the 'CALLED' agent to run on 'selected docs' form the calling db. If this wont work, then any suggestion is appreciated
 
From my experience, there are severe UI restrictions on what an agent can do if it is called from another agent. To put it bluntly, if you run an agent off of another one, the second agent will only have access to the backend. Any declaration of any UI object will be enough to sidetrack your second agent.

Pascal.
 
I have already removed all the UI code. Yes I knew about that as well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top