I have a web form that requires when a user submits the form, the new document is automatically reopened in Edit mode. I accomplish this via a URL redirect in the $$Return.
The problem is that if a user makes a change to the document after is is reopened and saves, a Save Conflict is created. The Conflict Option on Form properties have offered no help.
If the user were to reaccess the document through a view and make a change, no conflict is created.
Any ideas?
Subject: $$Return and Save Conflict
Why not simply use a Save rather than Save&Close action on the original presentation of the form?
Subject: RE: $$Return and Save Conflict
Without going into details, there are computations and hide/whens that take place after the initial save. The real question is why is there a conflict being created?
Subject: RE: $$Return and Save Conflict
Because the document being returned hasn’t been “completed”? Computations and hidewhens are perfectly compatible with using an @Command([FileSave]) action. Unless you are using a view to apply a form formula, I can’t see any defensible rationale for not using the built-in method of keeping a document alive in edit mode.
Subject: RE: $$Return and Save Conflict
This is a web app. It’s actually a Javascript function that ends in a .submit() that saves the doc. Plus, doesn’t a FileSave on the web produce a ‘Form processed’?
Subject: RE: $$Return and Save Conflict
No – it’ll only do that if there’s no $$Return and the action includes a FileCloseWindow. FileSave returns the user to the same document, still in edit mode. In the browser, it will fire the onsubmit code (_doClick() always evalutes the onsubmit), so you can still cram in all of your Javacript processing. If you give the actions ids on the tab, you can check _docClick.arguments[1].id to find out which button was clicked (the Save or the Save&Close, depending on the document state) and decide whether or not to run certain parts ogf the JavaScript.
Subject: Found the problem …
There was a doc.Save() being called in the WQO event. That was causing the conflict.