Solved

@Dialgogbox or window.open to creat a new form

Posted on 2007-04-10
5
176 Views
Last Modified: 2013-12-18
I'm looking for and agent (Button) that will creat a form in a differnt db. When the agent creates the form, it must be in a pop-up. I dont want a full screen, just a small pop-up. I know how to user the @dialogbox, but I dont know how to call it from a differnt db. I will be sending out a message with a button, and once the user presses the button, it will need to know how to get to the other database to  creat the new form in a pop-up style.
0
Comment
Question by:dennis_gardin
  • 4
5 Comments
 
LVL 4

Expert Comment

by:Blackmoorian
ID: 18887405
     Here is a lotusscript code you could use. Replace the values in [ ] with true values...
      
      Dim ws As New NotesUIWorkspace
      Dim db As NotesDatabase
      Dim doc As NotesDocument
      Dim srv As String
      Dim path As String
      Dim uidoc As NotesUIDocument
      
      'Location variables for other database
      srv = "ServerName"
      path = "[Path and FileName]"
      
      Dim db As New NotesDatabase( srv, path )
      Set doc = New NotesDocument( srdb )
      doc.Form = "[FormName]"
      '<You can auto set any other fields here>
      doc.date = Cstr(Today())
      doc.username = Cstr(s.CommonUserName)
      'etc
      '<end field assignment>
      
      Set uidoc = ws.DialogBox( [FormName] , [autoHorzFit] , [autoVertFit] , [noCancel] , [noNewFields] , [noFieldUpdate] , [readOnly] , [title$] , doc , [sizeToTable] , [noOkCancel] , [okCancelAtBottom] )


Parameters for DialogBox (taken from Help file)

autoHorzFit
Boolean. Optional. Specify True to scale the dialog box horizontally to fit the first layout region or table on the form. Otherwise, the dialog box is not scaled horizontally.
autoVertFit
Boolean. Optional. Specify True to scale the dialog box vertically to fit the first layout layout region or table on the form. Otherwise, the dialog box is not scaled vertically.
noCancel
Boolean. Optional. Specify True to not display the Cancel button. Otherwise, the dialog box contains the Cancel button.
noNewFields
Boolean. Optional. Specify True to not add fields that are on the dialog box form but not on the underlying form to the underlying document. Otherwise, all dialog box fields are passed to the underlying document.
noFieldUpdate
Boolean. Optional. Specify True if to not pass any edits from the dialog box to the underlying document (for example, if you're passing the edits somewhere else in a Queryclose script for the dialog box form). Otherwise, the edits are passed to the underlying form.
readOnly
Boolean. Optional. Specify True to prohibit writing to the dialog box (for example, if you are using the dialog box to display a help screen). Otherwise, the dialog box is read-write. This option makes noCancel true.
title$
String. Optional. A title for the dialog box. Defaults to "Lotus Notes."
sizeToTable
Note  This parameter is new with Release 5.
Boolean. Optional. Specify True to apply autoHorzFit and autoVertFit to the first table on the form. Otherwise, they are applied to the first layout region on the form.
noOkCancel
Note  This parameter is new with Release 5.
Boolean. Optional. Specify True to not display the OK button. Otherwise, the dialog box contains the OK button. Using this parameter prevents any changes made in the dialog box from being reflected in the current document. Use the RefreshParentNote method if you want changes to be reflected in the current document but don't want an Ok button to display.
okCancelAtBottom
Note  This parameter is new with Release 6.
Boolean. Optional. Specify True to display the OK and/or Cancel buttons side-by-side at the bottom right of the dialog box. If you specify False or omit this parameter, the buttons appear stacked at the top right.
0
 
LVL 4

Expert Comment

by:Blackmoorian
ID: 18887407
My apologies I typoed the one line... "Set doc = New NotesDocument( srdb )"

Should be "Set doc = New NotesDocument( db )"


0
 
LVL 4

Expert Comment

by:Blackmoorian
ID: 18887411
Also if you are going to pull CommonUserName don't forget to include

"Dim s As New NotesSession"
0
 
LVL 4

Accepted Solution

by:
Blackmoorian earned 500 total points
ID: 19533548
Haven't heard any response from the Asker as to whether the solution was what was looked for.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

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…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

759 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now