#7397
Support 1
Participant

Every script must contain a Main subroutine – the Formativ IDE automatically inserts one when you create a new applet.

I think the source code you are looking for will be something like:

Sub Main(Client, GWEvent)

  dim oPortal
  dim oPortals

  set oPortals = GroupWise.PortalManager.Portals
  set oPortal = oPortals.Item("MyCompany")

  if oPortal is nothing Then
    set oPortal = oPortals.Add
    oPortal.Caption = "My Company"
    oPortal.TabCaption = "My Company"
    oPortal.ID = "MyCompany"
    oPortal.NavigationControlsEnabled = false
    oPortal.URLInputEnabled = false
  end If
  oPortal.Url = "http://intranet"
  oPortal.Show
  oPortals.ActivePortal = oPortal.ID

  set oPortal = nothing
  set oPortals = nothing

End Sub

Regards,
Advansys Support