Skip to main content
This forum is closed to new posts and responses. New discussions are now taking place in the IBM Developer Answers forum.
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  IBM Lotus Notes/Domino 8.5 Forum (includes Lotus Notes Traveler)

IBM Lotus Notes/Domino 8.5 Forum (includes Lotus Notes Traveler)

Previous Next
Subject: ws.ComposeDocument
Feedback Type: Problem
Product Area: Domino Designer on Eclipse (DDE)
Technical Area: Error Message
Platform: Windows
Release: 8.5.3
Reproducible: -Reproducibility-

Hi everybody, I'm having trouble with ws.ComposeDocument() I have an action in Form on button, that should open a new document (Form). But I'm getting error 'Variable not set'.

I'm quite new to Lotusscript...

Sub Click(Source As Button)
Dim ses As New notessession
Dim ws As New NotesUIWorkSpace
Dim srcui As NotesUIDocument
Dim srcuii As NotesUIDocument
Dim db As notesdatabase
Set srcui = ws.CurrentDocument
Set db =ses.currentdatabase

If srcui.FieldGetText("PoradaType") <> "" Then
If srcui.FieldGetText("PoradaDate") <> "" And srcui.FieldGetText("PoradaTime") <> "" Then
If srcui.EditMode Then
Call srcui.save
End If

Call srcui.close
'----------------------------------------------------------------------
Set srcuii = ws.ComposeDocument( , , "bod") '"bod"
'----------------------------------------------------------------------
Dim pole As String
pole = srcuii.FieldGetText("IDbodu") '****Do pole se nahraje ID bodu
If srcui.editmode =False Then
srcui.EditMode = True
End If
If srcui.FieldGetText("souvID") = "" Then
Call srcui.FieldAppendText("souvID", pole)
Else
Call srcui.FieldAppendText("souvID", ";"+pole)
End If
Call srcui.save

Else
Messagebox "Není učen datum a čas konání porady", 48, "Chyba"
End If
Else
Messagebox "Není učen typ porady", 48, "Chyba"
End If

End Sub

'And Postopen action of a new document

Sub Postopen(Source As Notesuidocument)
'Call source.Save
'Set srcdoc = Source.Document
If source.IsNewDoc Then
Call source.FieldSetText("MailedResources", "")
Call source.FieldSetText("MailedAttendes", "")

GoBack = True

' nastavení políčka Servers
Dim ses As New NotesSession
Dim db As NotesDatabase
Set db = ses.CurrentDatabase
Dim srvnm As New NotesName(db.server)
srvname$ = srvnm.Canonical
If srvname$ <> "" Then uname$ = Lcase$(srvname$) Else uname$ = Lcase$(ses.UserName)
Dim pdoc As NotesDocument
Set pdoc = db.GetProfileDocument( "ProfileDocument", uname$)
' setup databáze
serverS$ = pdoc.GetFirstItem ("ServerDB").text
pathS$ = pdoc.GetFirstItem ("CestaDB").text + pdoc.GetFirstItem ("SouborDB").text
Dim sdb As New NotesDatabase (serverS$, pathS$)
Dim spdoc As NotesDocument 'setup profile document
Set spdoc = sdb.GetProfileDocument("ProfileDocument")
Call source.Document.ReplaceItemValue("Servers", spdoc.Servers)
End If
ano = ""
ne = ""
End Sub

Thank you for your help...


Feedback number WEBB8ZYDS9 created by Adam Jiros on 11/12/2012

Status: Open
Comments:

ws.ComposeDocument (Adam Jiros 12.Nov.12)
. . What is the debugger telling you? (Doug Finner 12.Nov.12)
. . . . ws.ComposeDocument() (Adam Jiros 12.Nov.12)
. . . . . . Ignore (Rich Schwartz 12.Nov.12)
. . . . . . What is in the "bod" form? (Rich Schwartz 12.Nov.12)
. . Agree with what others have respond... (Jochen Sack 13.Nov.12)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support


 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite