Solved

Button to create Location and Connection Documents

Posted on 2003-11-25
10
230 Views
Last Modified: 2013-12-18
Hi Guys

I need to create a button that I can email . It has to create a location document and connection document.

Any Ideas

James
0
Comment
Question by:adspmo
[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
  • 4
  • 3
  • 3
10 Comments
 
LVL 31

Expert Comment

by:qwaletee
ID: 9818992
I actually have one of those around here somewhere, let me check. if not, it is easy enough to write one.
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9819003
Oh, before I do this... R5 or R6?  And which paraneters do you want to set?

Location -- name, type, ports, mail-local/server, server name, mail file location (the last two can be retrieved from Person doc, assuming user already has access to it).  Often, the best option is to copy the current location doc, and change the minimum needed.

Connection -- need server name, address.
0
 

Author Comment

by:adspmo
ID: 9819193
Hi

I am sending out a memo to people that will be testing a new application.

It is on a test sever and there is no cross certification between the TestPMO and the SITA domain.
I figure the easiest is to have the folks press abutton that will create anew location document and a connection document if one doesn't already exist to allow them into my domain. I will also be sending a ID that the location document will automatically open when changed.

James
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9819335
Ok here is the quickie...

Which does both connection and location doc setup

http://www-10.lotus.com/ldd/sandbox.nsf/ecc552f1ab6e46e4852568a90055c4cd/3aa7da395066a28b85256982004fb86a?OpenDocument

~Hemanth
0
 

Author Comment

by:adspmo
ID: 9820601
I looked at this and tried it I am not having much luck
I will keep try ,however I need to get this working, the big boys are hovering

James
Sub Click(Source As Button)
      
      Dim ws As New NotesUIWorkspace
      Dim db As NotesDatabase
      Dim view As NotesView
      Dim uidoc As NotesUIDocument
      Dim doc As NotesDocument
      Dim num As Integer
      
      Set db = New NotesDatabase( "", "names.nsf" )
      Set view = db.GetView( "Connections" )
      Set doc = view.GetFirstDocument
      
      While Not doc Is Nothing
            Call doc.Remove(True)
            Set doc = view.GetFirstDocument
      Wend      
      
      Set uidoc = ws.CurrentDocument
      Set doc = uidoc.Document
      
      num = 1
      While uidoc.FieldGetText( "Server_" + Cstr( num% ) ) <> ""
            Call CreateConnection( db, "0", "", uidoc.FieldGetText( "Server_" + Cstr( num% )), uidoc.FieldGetText( "ServerAddress_" + Cstr( num% )), "*" )
            If doc.PassthruYN(0) = "1" Then
                  Call CreateConnection( db, "2", doc.Passthru(0), uidoc.FieldGetText( "Server_" + Cstr( num% )), "", "Internet" )
            End If
            num% = num% +1
      Wend
      
      Call CreateConnection( db, "0", "", doc.Sametime(0), doc.ServerAddress_ST(0), "*" )
      
End Sub

Function CreateConnection( Database As NotesDatabase, CType As String, PTServer As String, SName As String, SAddress As String, OFLocation As String )
      
      Dim doc As NotesDocument
      
      Set doc = New NotesDocument( Database )
      If CType = "0" Then
            doc.OptionalNetworkAddress = "10.22.0.200"
      Else
            doc.PassthruServer = PTServer
      End If
      doc.Form = "Connection"
      doc.ConnectionType = "Local Area Network"
      doc.Destination = "Developer1/TestPMO"
      doc.LanPortName = "TCPIP"
      doc.ConnectionLocation = "TestPMO"
      doc.Source = "*"
      doc.ConnectionRecordFirst = "1"
      Call doc.ComputeWithForm( True, True )
      Call doc.Save(True, True)
      
End Function

0
 

Author Comment

by:adspmo
ID: 9833791
I need help with this still

0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9834238
What is the problem James ?

Is the code not working or giving you errors ?
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9834473
adspmo,

When Hemanth beat me to the punch, I was going to abandon.  But I like picking apart others' code.  For example:

>      While Not doc Is Nothing
>           Call doc.Remove(True)
>           Set doc = view.GetFirstDocument
>      Wend    


This is a bad thing.  It says, "to bad if you had any old connection docs, I think yuo shoudln't have any."  Great.  In other words, if I'm not smart enough to figure out whether I'm replacing a particular connection (i.e., user already has a connection to a particular server), then I think I'll just trash 'em all.

Next, that whole      While uidoc.FieldGetText( "Server_" + Cstr( num% ) ) <> ""
bit is a bit too much for you.  It assumes yu have some sort of "setup doc" that describes all the connections yuo want to make.  Well, you don't have that.  All you need is the line:

               Call CreateConnection( db, "2", "pass thru name", "destination server", "", "Location name" )

Of course you are not using a pass trhu server.  So, the "2" is wrong (s/b "0"), and most likely that "" s/b the IP address.  So, we would get:

               Call CreateConnection( db, "0", "", "destination server", "destination address", "Location name" )

0
 

Author Comment

by:adspmo
ID: 9834870
First the db example was in german, So I had to guess at a few things. It doesn't workfor me

I think you are right qwalatee ,I need to keep it simple  

I will try tomorrow
0
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 350 total points
ID: 9840816
There is another link below in the thread gives you english version of it.
0

Featured Post

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

623 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