Hi
We have a lot of databases that are attached to a particular template. All the databases attached to this template have the About Database document ‘prohibit design refresh or replace to modify’ option ticked.
We have now come up with a better way to open all these databases but can’t modify the about database documents by the template as the databases are set to not allow this.
My plan is to write an agent that will go and do this for us and save me having to visit over 150 databases!!
Can I access this property programmatically and if so how ?
Many thanks
Paul
Subject: “About Database” Document - Agent to change ‘Prohibit’ value
The About document has a special NoteID – FFFF0002. You want to add “R” to the $Flags item, and don’t forget to sign the document.
Subject: Thanks Stan - just a little clarification needed
Thanks Stan but you have lost me a little.
So I would do this ?
db = xyz database
Set doc = db.GetDocumentByID( “FFFF0002” )
doc.$Flags = “R”
Call doc.Sign
Call doc.Save(True,True)
Thanks
Paul
Subject: RE: Thanks Stan - just a little clarification needed
Yep, that’s about it. You can actually go through the NotesDbDirectory db by db and check the .DesignTemplateName to make sure you get them all, too. The Flying Spaghetti Monster knows that human memories and documentation have only a very slight and coincidental relationship with reality :o)
Subject: Thanks Stan - one more thing
how do I set a field with a dollar symbol in its name ?
it won’t allow
doc.$Flags = “R”
thanks once again
Paul
Subject: RE: Thanks Stan - one more thing
Two ways around that mess:
doc.~$Flags = “R”
Call doc.ReplaceItemValue(“$Flags”, “R”)
I prefer the second, but the first (the one with the tilde) works just as well.
Subject: RE: Thanks Stan - one more thing
so here is my final code
Set hpaddoc = hpdb.GetDocumentByID("FFFF0002")
Call hpaddoc.ReplaceItemValue("$Flags", "R")
Call hpaddoc.Sign
Call hpaddoc.Save(True,True)
If the database already has had the tick taken off will it cause any problems ?
Thanks for all your help.
Paul
Subject: RE: Thanks Stan - one more thing
Nope – that’s all removing the tick does is to set the “R” value into the $Flags field. On any other design document (other than About and Using) you would have to worry about maintaining the other existing flag values, but on About and Using the “R” flag (or an empty value) are the only options.