Hi,
I am using the DBDesign-Object from Damian Katz (Thanks for doing this) to get a handle to the design-elements of agents.
The function works fine and returns the documents that “represent” an agent and I can read all
necessary fields out of them including the $TITLE-Field where the agent name is located.
The problem is that I seem to find more agents than I can see through the designer.
Exactly I have found the following cases:
a) I find agent-documents for agents that i cant see throught the designer at all.
(For ex. in the pubnames.ntf i find “WebJSClassTransfer”,“WebJSTools”,“WebJSNavigationTools”, and others …)
b) Sometimes I find agents-documents for agents with name “XXX” but if I look in the designer they have a different name.
(Everything else like “LastModifiedDate” is identical and therefore I am sure that it is the proper agent-document)
This happens especially on old datebases where the original design was created with R4 or earlier)
Can anybody please shed some light why any of these things happen ? (Julie ??)
Does anybody know how I can differenctiate these “wrong” documents and simply skip them ?
Thank for any info.
Bye
Lars
Subject: Problem when reading design-documents for agents …
Consider using the built-in NotesNoteCollection (Notes 6 only) to build a collection of design notes.It’s officially supported, and a lot faster, anyway.
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
REM Create note collection
Dim nc As NotesNoteCollection
Set nc = db.CreateNoteCollection(False)
nc.SelectAgents = True
Call nc.BuildCollection
… Now you may iterate over the nc collection (NoteID)
Subject: Thanks …
Hi,
this has to run on R5 only.
I definitly need a handle to the note as the information in the NotesAgent-Object is not sufficient :-((.
Nevertheless thanks.
Bye
Lars
Subject: What are you passing for your flagslike parameter?
getDesignDocuments( classtype As Integer, flagslike As String, invertlike As Integer )you should call with
getDesignDocuments(NOTE_CLASS_FILTER, DESIGN_FLAG_V4AGENT, 0)
Subject: Problem when reading design-documents for agents …
I am guessing Damien’s program misidentifies things that are not agents as agents. It is an unsupported untested program so it might have bugs or could be out of date since it was written a long time ago and new design elements have been added. As the internals change (we add new flags and new elements all the time) you at further risk of getting this type of problems.
If possible use supported APIs and methods because those we always guarantee to be updated and keep working as expected.
Subject: Sorry but I can’t do it better :-((
Hi,
i would like to use supported API functions but as far as i know in R5 it cant be done differently. :-((
Right now i try to “check” every agent in such a way that i read its name and then try to get it as an NotesAgent-object. If its there then it is a “regular” agent otherwise its “garbage”.
If anybody konws of a better solution please let me know.
Nevertheless THANKS for the answer.
Bye
Lars
Subject: RE: Sorry but I can’t do it better :-((
So far you haven’t said anything that explains why you can’t just use the NotesDatabase.Agents property.
Could the extra “agents” you’re seeing be script libraries? Or stored queries?
Subject: RE: Sorry but I can’t do it better :-((
Hi,
basically i need as much information as possible to check if the design-elements (in this case agents) are identical across replicas and templates.
I am especially interested in the following properties: Last Modified, Prohibit design refresh, inherit from template, Size, Propagate this …, and others.
I can get all of them from the actuall “design-document” for example from the $Flags-Field, but the NotesAgent-Class is not enough.
This has to be a purely R5 solution.
I dont think that the elements i can find are some different design-elements. It really looks like agents. I guess these are design elements that were created with an older version or maybe they were deleted.
However I think that i can live with the solution to skip all the elements that are “strange”.
Thanks a lot.
Bye
Lars