hi,
i want to open a pop-up window or a dialog box within agent. i looked in designer’s help but couldnt find anything. if someone elps me i will appreciate.
Thanks in advance
Regards
Özcan Arslan
hi,
i want to open a pop-up window or a dialog box within agent. i looked in designer’s help but couldnt find anything. if someone elps me i will appreciate.
Thanks in advance
Regards
Özcan Arslan
Subject: opening pop-up window within agent
check notesuiworkspace class — method dialogbox. It might help - i do not know what you are doing with the agent.
cheers
Subject: opening pop-up window within agent. ==> Here’s web code…
This LotusScript is in an agent called by clicking on a button on a web form. Validation could also have been done in javaScript, but it validates all the data on the form at the server and continues to save document if everything is correct. Obviously, put in your own validation…
Dim session As New NotesSession
Dim db As NotesDatabase
Dim ItemDetailView As NotesView
Dim Items As NotesDocumentCollection
Dim HeaderDoc As NotesDocument
Dim ItemDoc As NotesDocument
Dim doc As NotesDocument
On Error Goto HandleTheError
Set db = session.CurrentDatabase
Set HeaderDoc = Session.DocumentContext
Call HeaderDoc.save(True, False)
HasErrors = False
msg = "Errors were found which must be corrected."
If HeaderDoc.BAPI_CPlant(0) = "" Or HeaderDoc.BUKRS(0)="" Then
msg = msg + " Plant and Company must be specified before creating any items."
HasErrors = True
End If
If HeaderDoc.BAPI_CPurch_Org(0) = "" Then
msg = msg + " Purchasing Organization must not be blank, and must be specified before creating any items."
HasErrors = True
End If
If HeaderDoc.BAPI_CCurrency(0) = "" Then
msg = msg + " Currency must not be blank and must be specified before creating any items."
HasErrors = True
End If
If HeaderDoc.BAPI_CAcctassca(0) = "Y" And HeaderDoc.BAPI_CCost_Cta(0) = "" Then
msg = msg + " The Account Assignment category selected requires a Cost Center. It must be specified before creating any items."
HasErrors = True
End If
If HeaderDoc.BAPI_CAcctassca(0) = "W" And HeaderDoc.BAPI_CWbs_Elem(0) = "" Then
msg = msg + " The Account Assignment category selected requires a Project number. It must be specified before creating any items."
HasErrors = True
End If
If HeaderDoc.BAPI_CAcctassca(0) = "O" And HeaderDoc.BAPI_COrder_No(0) = "" Then
msg = msg + " The Account Assignment category selected requires an Internal Order. It must be specified before creating any items."
HasErrors = True
End If
'and the meat & potatoes…
If HasErrors Then
Print "<Script>alert('" + msg + "');"
Print " window.history.go(-1) </Script>"
Exit Sub
End If
the rest of your agent goes here…
Subject: opening pop-up window within agent
if this is a backend agent (including web), then there is categorically no way to do this, as there is no user to interact with.
Subject: RE: opening pop-up window within agent
maybe this
If Server = “” Then
Call winmessage ( “Server not found”,0+64,“Error” ,“5”)
Exit Sub
End If
Function winmessage (Textstring As String, ButCode As Integer, Title As String, WaitSec As String) As Integer
Dim WshShell As Variant
Set WshShell = CreateObject("WScript.Shell")
winmessage = WshShell.Popup(Textstring, WaitSec,Title, ButCode)
End Function
Subject: RE: opening pop-up window within agent
And if the code is running on the server, then you will see this message if someone is sitting at the server and has logged into the OS.