Home > Domino Tips > Developer > Agent > Signing agents
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

AGENT

Signing agents


Siraj Shaikh
12.19.2001
Rating: -3.93- (out of 5) Hall of fame tip of the month winner


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


Agents play one of the most important role in a Domino applications, as most of the backend and scheduling activities are done by agents. So, it is very crucial that the agents to run in the desired fashion, for proper functioning of the application.

But many times it happens that the agents that work perfectly in development environments just don't work once they are into production. The most common culprit behind this is the agent signer. The agent takes up the ID of the user/designer who last modified it. Once these agents are into production, they stop working, as the signer of the agent does not have the required agent execution rights on the server.

The solution for this is to open the agents in designer using the ID of a person who has proper agent execution rights on the server and save them. But this is not always feasible. I have found a workaround for this.

Create a new shared, Lotus Script agent on the server. In run when : select Manually from actions menu, Run once(@ command may be used). Write the following code in the initialise event of the agent and save it. You can then run the agent from the actions menu. The agent will run & sign all the other agents, except itself, with the current ID. In this way, all the agents will have their signer as the person who ran this agent.



Code

Sub Initialize
	Dim s As New NotesSession
	Dim db As NotesDatabase
	Dim agt As NotesAgent
	Dim doc As NotesDocument
	Dim view As NotesView
	Dim x As Variant
	Dim y As Variant
	
	Set agt=s.currentagent
	x=agt.Name 
	Set db=agt.parent
	Forall a In db.Agents
		y=a.name
		If x<>y Then
		Call a.Save
		End If	
	End Forall
	
End Sub

Rate this Tip
To rate tips, you must be a member of SearchDomino.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
Agent
Open documents in Lotus Notes from the Web without a UNID
Fix and update Lotus Notes documents with limited access
Verify scheduled agent status with Domino Extensible Language (DXL)
How to export data from a Lotus Notes database to a CSV file
Enable or disable scheduled agents without opening the Lotus Notes database design
Creating custom views in Lotus Notes databases
Editing fields in a Lotus Notes view with Ajax
How to automatically create a backup copy of your Domino Directory
Export Lotus Notes documents to Microsoft Word via Internet Explorer
A bevy of Notes/Domino development tips

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Domino & Lotus Notes Security Solutions: Authentication, Antispam, Encryption and Antivirus
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 1999 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts