Hi all,based on certain condition i would like to compose new doc in web by using lotus script, pls advice me how to do.
regds
soma
Hi all,based on certain condition i would like to compose new doc in web by using lotus script, pls advice me how to do.
regds
soma
Subject: how to create a new doc in web by using lotus script
You can only trigger Lotusscript code via agents on the web (e.g. in the WebQuerySave event). Assuming that your web users have document creation rights, this should all go fine. Simply write some code in the normal way, i.e. something like this:
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Dim doc As New NotesDocument(db)
doc.ReplaceItemValue "Form", "YOUR FORM NAME"
… and so on.
Out of interest, what is it you’re trying to do? Why not use simpler methods like ?CreateDocument or ?OpenForm URLs?
–
Subject: RE: how to create a new doc in web by using lotus script
Hi, I am having a view in that view having an action button, if there is no doc in a view then only i want to compose a doc, if there is any doc i want to just prompt the message. in my below code the following line is not working, how to do it, pls advice me.
Evaluate(|@Urlopen(“http://vmokshatest/pratima1/oppmgtsys.nsf/Miscform?OpenForm”)|)
here is my full code
Dim ss As New notessession
Dim db As notesdatabase
Dim doc1 As notesdocument
Dim curdoc As notesdocument
Set curdoc=ss.documentcontext
Dim dc As notesdocumentcollection
Dim doc As notesdocument
Set db=ss.currentdatabase
probvalue=Evaluate(|@DbColumn("":"Nocache";"";"(miscview)";1)|)
If Cstr(probvalue(0))<>"" Then
Print "<SCRIPT LANGUAGE=JavaScript>"
Print "alert(""Miscellaneous document is existing. Please don\'t create a new misc., document. Thank you'"")"
Print "history.go(-1)"
Print "</SCRIPT>"
Else
Evaluate(|@Urlopen("http://vmokshatest/pratima1/oppmgtsys.nsf/Miscform?OpenForm")|)
end if
Subject: RE: how to create a new doc in web by using lotus script
You can still use an ?OpenForm URL. If you print a URL with brackets around it, it should redirect the browser to that URL. Try this in place of your Evaluate:
Print “[http://vmokshatest/pratima1/oppmgtsys.nsf/Miscform?OpenForm]”
Subject: RE: how to create a new doc in web by using lotus script
hi Riggy, Great thanks, it is working fine.
regds
soma