Reputation: 11786
When a form is saved via a button, I want to also create a new document using the form "MSG", which has fields for message title, body and recipient. At first I thought it might be possible using only a JS library, but now I am unsure. What about opening an unrendered XPage which is bound to that document's form, and inheriting the values into it?
Upvotes: 0
Views: 515
Reputation: 308
I hope I understand your question right: try inserting code like this in XPage's datasource (e.g. document1) postSave event:
var doc:NotesDocument=database.createDocument();
doc.replaceItemValue("Form","msg");
doc.replaceItemValue("title",document1.getItemValueString("title"));
...
doc.save(true);
Upvotes: 1