Adds an appointment, contact, or task as a Pocket Outlook entry.
POOM objects
Integer objectname.Add (entity)
Argument |
Description |
---|---|
objectname |
The name of the POOM object |
entity |
Entity of type POOMAppointment, POOMContact, or POOMTask |
Integer. Returns 1 for success and one of the following negative values if an error occurs:
-2 Cannot connect to the repository or a required internal subobject failed to connect to the repository
A user must be logged in to a POOM object to add an appointment, contact, or task. For a POOMTask object, the StartDate property must be set before you call Add. The Body and BodyInk properties cannot be set until after the new object has been added to the repository, but their values are updated in the repository implicitly when either value is set.
The following example adds an appointment to the depository, adds body text, and displays the appointment in the Pocket PC Calendar:
// Global variable: g_poom integer li_rc POOMAppointment appt DateTime dt Date ld_date Time lt_time appt = CREATE POOMAppointment appt.Subject = "All Hands" appt.Location = "Auditorium" // get the start and end times from EditMasks ld_date = Date(em_startdate.Text) lt_time = Time(em_starttime.Text) dt = DateTime(ld_date, lt_time) appt.appointmentStart = dt ld_date = Date(em_enddate.Text) lt_time = Time(em_endtime.Text) dt = DateTime(ld_date, lt_time) li_rc = g_poom.Add( appt ) // Now add the body of the appointment appt.Body = "Agenda: ~r~n Quarterly results " & + "~r~n Success stories" & + "~r~n Organizational changes" // Display the appointment appt.display()