I am creating a simple workflow application (used with the Notes client only) where a person fills out a form and submits it. When the person submits the form I would like to add the next person in line to an Authors field and remove the current user from the Author field so they can no longer make changes to the document. However, when the user tries to submit (save) the document, they get the following message:
“You cannot update or delete the document(s) since you are not listed as an allowable Author for this document”
Are there any strategies to do this … remove the current person from an Authors field, add the next person to the Authors field, and save the document?
Thanks
Subject: Remove Author name and save
Jack,
It is right that the logged on user cannot remove themselves from the Authors list whilst they are in the document
You could think about having a scheduled agent to update the Authors field in the background after the save has been done.
Mike
Subject: Remove Author name and save
The easiest way would be to have a ‘Approver’ field which stores the current approver in the cycle. In the Authors field keep both approvers. In your approve action only allow the action to continue is the current user is the user listed in the Approver field, otherwise display a prompt eg “You have already approved this document…” something like that.
Subject: Remove Author name and save
it must work!
if the person has author rigts for a document he can it modify and save.
use adress dialog for setting a new name as author.
after saveing the last author has no mor author right!
I’m using this always for workflow applications.
it works with @formulas and also with LS
Subject: RE: Remove Author name and save
Holger is correct; an Author’s edit rights to a document are based on the value of the Authors field(s) in the on-disk version of the document, not the on-screen version. So an Author with edit rights can demote themselves to a non-Editor.
Subject: RE: Remove Author name and save
However, if the save “bounces” (that is, if more than one save is called from different bits of code initiated via a save action), any save subsequent to changing the Authors field will result in the error described. I’d take a good look at any PostSave, QuerySend or QueryClose code.
Subject: RE: Remove Author name and save
Mais certainement; once the first save occurs following the Authors name field change, no further saves will be allowed. And given the error message in the original post, it seems that this is the likely culprit; Jack should find the cause of the multiple saves and reduce their number to only one that occurs after the Authors field is updated.
I’d think that making the change to the Authors field either in QuerySave with an @valid test or in a Computed field at the bottom of the form which fires only after all validation formulas successfully fire (and/or with its Compute after validation property set) would take care of it.