• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Edit
Show / Hide Table of Contents

Create an appointment row

Some tooltip text!
• 1 minute to read
 • 1 minute to read

An AppointmentRow refers to a row in the appointment database table. Therefore, it consists of basic data types supported by SQL. To create an AppointmentRow we use the SuperOffice.CRM.Rows namespace.

The following example shows how we create an appointment using the AppointmentRow class.

Code

using SuperOffice.CRM.Rows;
using SuperOffice;
using(SoSession mySession = SoSession.Authenticate("sam", "sam"))
{
  //Instantiate a AppointmentRow Type
  AppointmentRow newAppointment = AppointmentRow.CreateNew();

  //Set Default values to the AppointmentRow
  newAppointment.SetDefaults();

  //Assign values to the instantiated AppointmentRow
  newAppointment.Location = "Seminar Room 663";
  newAppointment.ContactId = 20;
  newAppointment.PersonId = 10;
  newAppointment.Alarm = 1254;
  newAppointment.DoBy = new DateTime(2007, 3, 31);
  newAppointment.HasAlarm = 1;

  //Saving the created AppointmentRow
  newAppointment.Save();
}

Walk-through

The first step of the example shows how to instantiate an AppointmentRow class and then the next step is to set the default values of it with the SetDefaults method.

AppointmentRow newAppointment = AppointmentRow.CreateNew();
newAppointment.SetDefaults();

The next statements show how the different properties of the AppointmentRow are assigned. Once such assignments are made, the row could be saved with the Save method available in the AppointmentRow class.

In This Article
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top