We’ve developed some resources to help you work effectively from home during COVID-19 Click here to learn more

Sample Script

In this article

    This script shows how to catch the Startup event, showing a welcoming message box.

    Sub OnStartup()
        SOMessageBox "Welcome to SuperOffice"
    EndSub

    When a new sale is created, we create an appointment in the future so we remember to follow up on the sale

    sub OnCurrentSaleCreated
    'we create a followup to call the customer two days after a sale is registered
          Set newAppnt1 = database.CreateAppointment
          newAppnt1.SetDefaults
          newAppnt1.Contact = Currentsale.Contact
          newAppnt1.Person = Currentsale.Person
          newAppnt1.task = database.GetListItemByName(67, "Phone-Out")
          newAppnt1.DoBy = DateAdd("d", 2, Now())
          newAppnt1.Description = "We sent you a proposal two days ago, did you take a look at it...."
          newAppnt1.Save
    endsub