Click or drag to resize

IScriptingEventsOnSaleDeleted Method

Identity is the id of the current object.

Namespace:  SuperOffice.COM.ScriptEvents
Assembly:  Scripting.Interop (in Scripting.Interop.dll) Version: 8.0.0.0
Syntax
void OnSaleDeleted(
	int identity
)

Parameters

identity
Type: SystemInt32
sale_id
Examples

Description

VB
Sub OnSaleDeleted (saleId)

    Set myProjects = Database.Find.ProjectsByName("Deleted - warnings")
    set myProject = myProjects.GetFirst
    If myProjects.EOF Then
        'No contact exist, create it.
        Set myProject = Database.CreateProject
        myProject.SetDefaults
        myProject.Name = "Deleted - warnings"
        myProject.Save
    End If

    Set soApnt = Database.CreateAppointment
    soApnt.SetDefaults
    soApnt.Contact = currentcontact
    soApnt.Project = myProject
    soApnt.Description = Now() & "Sale_id= " & saleId & vbcrlf & "***** Was deleted. You may check it's history in the salehist table *****"
    soApnt.Save

End Sub

See Also