My problem is that I have an agent that I run that creates a new document in the backend, and then saves it. On that document, there is a computed authors field, which I populate programatically with a person’s canonicalized name.
But the person in that authors field is unable to edit the document. When I do properties on the field, the Field Flags line says only:
Field Flags: SUMMARY
Once I (with mgr access) open the document, refresh it, and re-save it, the person in the authors field is then able to edit the document, and when I then do properties on the field, the line now reads:
Field Flags: SUMMARY READ/WRITE-ACCESS NAMES
Obviously, I can’t be manually going in and resaving every doc when it’s created. Any ideas on what’s going on here, and how I can fix it?
Subject: Authors fields not working on backend-created document
I’m guessing that you’re populating the field with a line like this:
doc.fieldname = “whatever value”
The problem with that is that those flags you’re noticing don’t get set properly until you open the document in the client, where a different set of machinery kicks in and the form design imposes the flags on the field. What you need to do in your code is to use the NotesItem class to set the field and set the Authors property for the item to True.