Click or drag to resize

IScriptingEventsOnCurrentDocumentBeforeSave 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 OnCurrentDocumentBeforeSave()
Examples

Description

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

VB
Sub OnCurrentDocumentBeforeSave
'Requires a user defined text field
'named "Extra info" defined on document

If CurrentContact.Category.Text = "Business Partner" Then
    If CurrentDocument.Template.Text = "Memo" Then
            CurrentDocument.UDef.ByName("Extra info").Value = "Make a note of..."
    End If
End If

End Sub

See Also