2

is it possible to run a lotusscript agent from a Xpages form which is not saved yet? I have "xspFrmTest.xsp" page, lotusscript agent name (wsAgent)

When i open /xspFrmTest.xsp?action?newDocument then with a button i call Lotusscript agent but as far as i know I can not call agent without savind document? is it possible to call it from new Xpages document(Xpages form)

Just wondering its possibility.
Regards
C.A.

UPDATE

Dim rtitem As NotesRichTextItem
Set rtitem = doc.GetFirstItem("Body")
If (rtitem.Type = RICHTEXT ) Then
ForAll o In rtitem.EmbeddedObjects
If ( o.Type = EMBED_ATTACHMENT ) Then
sFilePath = "E:\AttachFolder\" + o.Name
Call o.ExtractFile(sFilePath)
End If
End ForAll
End If
Renaud Tarnec
  • 53,666
  • 7
  • 52
  • 80
Cumhur Ata
  • 797
  • 5
  • 16
  • 1
    Try NotesAgent.RunWithDocumentContext(). You can find examples for XPage- use in Domino Designer help... – Torsten Link Jun 14 '17 at 14:00
  • Thank you so much. The only question is, is it possible to work with attachments? I updated my question – Cumhur Ata Jun 15 '17 at 06:46
  • this may also be usefull to get rid of LS part... https://stackoverflow.com/questions/17073250/how-to-upload-and-save-an-attachment-via-xpages-java-bean – umeli Jun 21 '17 at 15:35

1 Answers1

0

I think I may not be able to use or reach any of attachments before until i save the document

Cumhur Ata
  • 797
  • 5
  • 16