Solved

Script Question

Posted on 2003-11-28
4
262 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 500 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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

728 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