< Back

Document Subject: Prevent Agents running in Templates
Hint Short Cut: Add this to your code & documentation to help you find this page.
http://#AgentsInTemplates or http://A555F9/nn.nsf/ByAlias/AgentsInTemplates

When you have many databases using the same template and having agents, we use to prohibit design refresh of the agent, to prevent execution of the agent in the template. Now we just add some code.




 

Set s = New notessession
Set db = s.currentdatabase

'if this is a template then exit now
If db.templatename <> "" Then
 Print "Agent is in a template"
 End
End If

 

Warning: if the agent normally runs in a database with a tempate and you temporarily remove the template information for whatever reason, the agent will not run.