Click or drag to resize

IScriptingEventsOnCurrentAppointmentBeforeSave Method

Called when Save has been triggered, but before anything is saved to the database.

Namespace:  SuperOffice.COM.ScriptEvents
Assembly:  Scripting.Interop (in Scripting.Interop.dll) Version: 8.0.0.0
Syntax
void OnCurrentAppointmentBeforeSave()
Examples

Description

This text may be copied to the notepad, and saved as a *.vbs file.

VB
Sub OnCurrentAppointmentBeforeSave
'Requires a user defined text field 
'named "Extra info" defined on appointment

If CurrentContact.Category.Text = "Business Partner" Then
    If CurrentAppointment.Task.Id = Database.GetListItemByName(enTableTask, "Meeting (Internal)").Id Then
        CurrentAppointment.UDef.ByName("Extra info").Value = "Special meeting"
    End If
End If

End Sub

See Also