xPages: Form is not triggering querySaveDocument-event

Hi,

I have a xPage which serves as a form for documents. Its “data source” is set to “Domino Document”,form to “Person”, default action “Edit document”.

On the page I have a “Save”-button with the simple action “Save Document”.

I can create new docs, open existing ones from the view, edit them and then save them. This all works. And the fields are really saved.

However i inserted prints like “print(‘Opening’)” into the Document events of the forms.

queryOpenDocument and computeDocument are triggered fine.

But querySaveDocument and postSaveDocument are NOT. They never show at the console.

I would like to trigger an agent after the document is saved.

Any idea what i am doing wrong ?

Thanks

Lars

Subject: Solved …

Hi,

through a lot of trying i somehow solved this problem. The solution is that the “Save”-button does does not contain the somple action “Save Document” but instead it gets the action “Save Data Sources”.

Then all the save events are fired.

To run a “QuerySave” Agent i added this code to the postSaveDocument-Event:

var noteID = Doc.getNoteID();

database.getAgent(“Ticket-WebQuerySave”).run(noteID);

Bye

Lars