Click or drag to resize

IScriptingEventsOnCurrentRelationCreated Method

Called when a new object is saved for the first time.

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

Description

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

VB
Sub OnCurrentRelationCreated
  If CurrentRelation.ActiveText = "owns" Then
    CurrentContact.Category = Database.GetListItemByName(64, "Mother company") 'enTableCategory = 64
  ElseIf CurrentRelation.ActiveText = "is owned by" Then
    CurrentContact.Category = Database.GetListItemByName(64, "Subsidiary") 'enTableCategory = 64
  End If    
End Sub

See Also