Click or drag to resize

IScriptingEventsOnCurrentContactBeforeSave 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 OnCurrentContactBeforeSave()
Examples

Description

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

VB
Sub OnCurrentContactBeforeSave
' requires a userdefined field named 
' "Next service" as date defined on contact

'If this is a new contact, then set Next service
if Currentcontact.identity = 0 then

    'Ser next service to three months from today
        CurrentContact.UDef.ByName("Next service").Value = DateAdd("m", 3, Now())
    Next
end if

End Sub

See Also