I’m working on a project which reproduce a workflow for the web but i’ve got some wright access problems.
The authors field is computed with the step of my workflow. At Step 1, user A is Authors and he validates the form. The step is increased in a webquerysave agent to give Authors access to user B and remove any access to user A. To make it correctly i have to insert a computewithform before saving but instead of my validation page i’ve got a page with this message :
Error 500
HTTP Web Server: Lotus Notes Exception - You cannot update or delete the document(s) since you are not listed as an allowable Author for this document
But my document has changed to step 2 and user B is the only Author.
What’s wrong with my method ? How could i save a document if i remove my access on it ?
Hi,How you’re vaidating data?. Is it just validating fields on the form?. If so, use Javascript. Once the form is validated, then only do submit.
If you want to validate form data with the data stored in the database, run an agent to validate data using AJAX. Once the data is validated, then do submit.
Once the form data is submitted then update the status/step and the routing path based on that status/step.
We may give you few more suggestions, if we see the code.
When the WQS agent calls the ComputeWithForm() method of notesdocument object, it computes the author field on the document. Then the user doesn’t have edit access to it and error out when you call Save() method. So instead of calling Computewithform (Which is a heavy operation in terms of performance), set the authors field (Evaluate can be used to put the formula) and then save the document.