I'm writing a utility to update person documents in names.nsf. I'm using a C# program using Interop.Domino.
I'd like to validate the input but I can't find a document which describes the开发者_如何学编程 schema for a person document, so I can determine min lengths, max lengths, etc.
Is anyone aware of one?
You can now download Domino Designer for free ==>link text
There is also an online reference for help ==> link text
Computewithform will use the form design in the names.nsf to re-calculate values and ensure the document has been setup. But there is no "schema" to see how to configure the person document. Like Anders, this is a process intensive operation, and should not be run on thousands of documents at once.
Before you start reviling in horror at schema-less designs, this concept allowed developers to construct form designs quickly using agile approaches. In complex designs, it starts to work against you, as you'll need to have the domino designer so you can see how specific fields are configured.
You can use the NotesDocument.ComputeWithForm function to verify that what you've written to the document matches the form.
This validation is a real bottleneck, so if you need to update many documents I suggest you examine the design of the Person
form (and the $PersonInheritableSchema
/$PersonGeneralInfo
subforms) and check out:
Input Translation
formulas.Input Validation
formulas.Value
formulas for computed fields.
Then write your code to match. As long as you stay away from the fields involved with fullname, mail system, passwords and certificates you shouldn't be able to cause any problems from Dominos point of view.
If you need to create new users, check out the NotesRegistration class.
精彩评论