Click or drag to resize

IScriptingEventsOnCurrentPersonBeforeSave 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 OnCurrentPersonBeforeSave()
Examples

Description

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

VB
Sub OnCurrentPersonBeforeSave
' requires a userdefined field named 
' "Next update" as date defined on person

'If this is a new person, then set Next update interval
if Currentperson.identity = 0 then
        'Ser next update a year from today
        currentperson.udef.ByName("Next update").value = DateAdd("m", 12, Now())
end if

End Sub

See Also