I'm running an agent which modifies view column title (using NotesViewColumn class). Everything is fine until I open the modified view, in the status bar below it says "document has been modified or corrupted since signed! (data)". Any suggestion on how to solve this. Thanks in advance.
Asked
Active
Viewed 3,049 times
1
-
2It's working as expected. It is telling you someone has touched the document since it was last signed and the data doesn't match the signature. So it is warning to the end user that the contents can no longer be verified coming from whoever signed it. – Simon O'Doherty Jul 17 '13 at 11:48
-
1@SimonO'Doherty: So using `NotesDatabase.Sign(DBSIGN_DOC_VIEW)` should resolve this issue, right? – Naveen Jul 17 '13 at 14:10
-
I haven't tested it, so can't say with 100% it will or not. But whatever runs the code will need access to the private key. So it will need to run as the active user (notes client) or Server ID (on the server). – Simon O'Doherty Jul 17 '13 at 14:14
-
Using NotesDatabase.Sign will resolve it if it's signed at the document level, but if it's a section signature I'm not sure what the story will be. In any case, though, now the signature will be the identity of the agent (probably the server ID since you need the private key in order to sign); and that means that the original signer's identity is lost. If that's okay, well, then it might be a solution. The only alternative that preserves the original signature, though, would be to not change the data in the first place. – Richard Schwartz Jul 17 '13 at 17:07
-
The logically next question would then be: why do you want to modify a view column title in a view? – D.Bugger Jul 17 '13 at 22:50
-
1Oooh... I just noticed that this is really talking about the signature on the design note for a view, not the signature on a document. Most of what I said in my comment above really does not apply. – Richard Schwartz Jul 18 '13 at 00:38
-
Thanks for you inputs..NotesDatabase.Sign() worked but it only runs on client (which uses the current user id), i need to run my agent on server to have the signer of the agent as the signer of the modified view. BTW i needed to modify the view column title because i display years on it, currently im displaying it as 'current year', 'current year+1'.. etc, but they require to have it actual years like '2013', '2014'. This 'current year' is maintained in a profile document, whenever profile doucument is saved i run this agent on server(postsave event of form). – Jericho Swain Jul 18 '13 at 01:23
-
Found a solution from a sample code here [link](http://www-10.lotus.com/ldd/ddwiki.nsf/dx/view-of-design-elements.htm) – Jericho Swain Jul 18 '13 at 04:44
1 Answers
3
I get the view as a NotesDocument
object using NotesDatabase.getDocumentByUNID('unid of view')
and used sign()
and save()
methods, it worked :) thanks again

Jericho Swain
- 41
- 1
- 5