?
Solved

Script Question

Posted on 2003-11-28
4
Medium Priority
?
263 Views
Last Modified: 2013-12-18
Hello

why does the following code place the response document if the parent document is new with the document below the correct document and when it is old (or been created prior) it places the response document in the correct place??

ValidityCheck = Doc.Validity(0)
      If (Validity <> ValidityCheck) And (ValidityCheck = "Invalid") Then
            Dim Values() As String
            Dim LineCount As Integer
            Set View = Db.GetView("(Text Lookup)")
            View.Refresh
            Set Nav = View.CreateViewNav()
            Set Entry = Nav.GetFirst
            LineCount = -1
            Do While Not(Entry Is Nothing)
                  LineCount = LineCount + 1
                  Redim Preserve Values(LineCount)
                  Values(LineCount) = Entry.ColumnValues(0)
                  Set Entry = Nav.GetNext(Entry)
            Loop
            LetterType = Ws.Prompt(PROMPT_OKCANCELLIST, "Select Letter Type", "Select the type of letter you wish to create", "", Values)
            If LetterType = "" Then Exit Sub
            Dim ProfileDoc As NotesDocument
            Set ProfileDoc = Db.GetProfileDocument("ProfileForm", Ses.UserName)
            ProfileDoc.DocumentType = LetterType
            ProfileDoc.Save True, False
            Ws.ComposeDocument "", "", "Letter"
      End If
0
Comment
Question by:DavidAbbott
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 9837040
David,

That is the natural behaviour of Lotus Domino. Your current document must be a valid back-end document before you can create a response document on it. If you try creating a resposnse document for an in-memory (a front-end) docuemnt, it will never be associated correctly.

0
 
LVL 19

Accepted Solution

by:
RanjeetRain earned 2000 total points
ID: 9837050
Try saving the current front-end docuemnt (represented by UIDoc) and retrieve the corresponding NoteID for this document. Then pass this NoteID as the forst argument to WS.ComposeDocument
0
 

Author Comment

by:DavidAbbott
ID: 9837107
Thanks for the help
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 9837117
Oh my pleasure David!
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question